Thanks to visit codestin.com
Credit goes to github.com

Skip to content

API classes' constructors using the default KillBillHttpClient constructor cause 404 because of bad url formatting #140

@HoucemEdHr

Description

@HoucemEdHr

So API classes (TenantApi for instance) have default constructors that call the default constructor of KillBillHttpClient. The latter relies on system properties or fallback values to init some fileds namely the KillBillHttpClient's kbServerUrl field, so if the system property "killbill.url" isn't set, the fallback value "http://127.0.0.1:8080/" is used instead and since each api has a uri(path) looking like this "/1.0/kb/tenants" , so this line
"u = new URI(String.format("%s%s", this.kbServerUrl, url));" in KillBillHttpClient.getURI() is causing the url used in request to look like this "http://127.0.0.1:8080//1.0/kb/tenants" (notice the // after port), this is causing every request to return null (404 not found) ,as a fix when I set the system property killbill.url to "http://127.0.0.1:8080", requests are successful !
#version1.3.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions