Hello,
I have this very simple SAL request object
Request request = requestFactory.createRequest(methodType, baseUrl + requestURL);
String returnValue = request.execute();
that queries a Confluence web services. When I view returnValue in debugger, all umlauts in the JSON response are badly encoded. How can I prevent this? Do I need to supply a request header?
The same request works fine in REST API browser.
Community moderators have prevented the ability to post new answers.
Hi Stefan,
You are right, try to add header:
"Content-Type", "application/json; charset=UTF-8"
Hi, unfortunately that didn't help code: request = request.setHeader("Content-Type", "application/json; charset=UTF-8"); String returnValue = request.execute(); result: "id": "98307", "type": "page", "title": "Prettify the page with an image (step 4 of 9) Umlaute ü ä U;", I might try another encoding
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If it's fine in the REST API browser, you can copy all the headers from it and it should give you the same response. Then you can find odd headers commenting them one-by-one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.