Skip to content
This repository was archived by the owner on Feb 10, 2022. It is now read-only.
This repository was archived by the owner on Feb 10, 2022. It is now read-only.

ApiClient escapeString issue #42

Description

@renemtz

Hi!

I am trying to implement a PUT request from java. When I use my resource as "item/$ITEM_ID" (I have replaced $ITEM_ID with the real item id) in:

RestClientApi apiInstance = new RestClientApi(defaultClient);
apiInstance.resourcePut(resource, accessToken, body);

I receive an 400 error, which means that the server not recognized that resource.

I debug the method and I noticed that the method ApiClient.escapeString is replacing the slash of "items/$ITEM_ID" because of

URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20");

when I evaluate the result of that code I found:

"/items%2F$ITEM_ID" instead of "/items/$ITEM_ID"

I will appreciate if you can find a solution of this.

Have a nice day!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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