Open uukeshov opened 4 years ago
what server are you using? what error message do you get? The use of [ and ] within URLs has a bit of history. One the spec side some people would like to have it escaped. On the other side none of the browsers actually do that. There is, for example, CrnkTomcatAutoConfiguration which enables support for it in Tomcat (on the server-side).
what server are you using?
for now i found workaround i'm intercepting HttpRequest and replacing this chracters [] to needed one.
Thank u, for reply!
Tomcat 9 requires square brackets to be encoded and will return a 400 if they are not:
Invalid character found in the request target [/v0/resourceName?filter[someAttr]=matchValue ]. The valid characters are defined in RFC 7230 and RFC 3986
I'm using Crnk Client to consume an API published on Tomcat (not using Crnk), and this behavior produces OOTB failures.
I greet you!
I implemented a service that acts as a client for another REST service that is implemented according to the json api specification.
for my part, all models are created and their properties are described.
I had a problem with the character encoding [] when working with the service with the json API specification. the problem is that the service requires to encode these characters in the form (% 5B,% 5D%), respectively. Example:
Regular request: http://127.0.0.1:8080/api/subscriptions?filter[msisdn]=99999999
Required request type: http://127.0.0.1:8080/api/subscriptions?filter%5Bmsisdn%5D=99999999
how can this be done, can you tell?