I have a problem using HTTPBuilder in Grails.
The code looks something like this.
def http = new HTTPBuilder("theURL") http.request(method, ContentType.JSON) { uri.path = "theURI" headers.'Authorization' = "OAuth $accessToken" headers.'Accept' = "application/json" headers.'content-type' = "application/json;charset=utf-8" response.success = { resp, json -> result = json } } return result
Now the JSON answer is with "Cobro N 1234", but I need "Cobro Nยบ 1234"
I tried this with curl and the answer was "Cobro Nยบ 1234", it made me think that the problem was with HTTPBuilder, and not with my API, which responded to the request.
I think this is a problem with response encoding.
source share