You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, like the client. Wondering if there is any way to send a JSON payload, and get back a application/octet-stream?
I'm getting a response parse error: wslite.rest.RESTContentParseException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
Or alternatively, is there a way to just disable auto JSON parsing? (Problem is, I must send a request that has content-type=application/json, but wslite seems to assume that that means JSON is always returned?)
The text was updated successfully, but these errors were encountered:
Looking at the code, it doesn't look like wslite assumes the return contentType is JSON. It takes the return contentType from HttpUrlConnection.getContentType(), which should be your application/octet-stream. And wslite doesn't try to parse the response as JSON unless it really recognizes it as something JSON encoded, eg contentType is one of the following: JSON(['application/json', 'application/hal+json', 'application/javascript', 'text/javascript', 'text/json']).
Are you sure your server responds with a Content-Type: application/octet-stream header?
Hi, like the client. Wondering if there is any way to send a JSON payload, and get back a
application/octet-stream
?I'm getting a response parse error:
wslite.rest.RESTContentParseException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
Or alternatively, is there a way to just disable auto JSON parsing? (Problem is, I must send a request that has
content-type=application/json
, but wslite seems to assume that that means JSON is always returned?)The text was updated successfully, but these errors were encountered: