mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
fixed response parsing in post request template [android-volley]
This commit is contained in:
parent
2e4f6dc0a1
commit
5cfcb0b60b
@ -49,7 +49,13 @@ public class PostRequest extends Request<String> {
|
||||
|
||||
@Override
|
||||
protected Response<String> parseNetworkResponse(NetworkResponse response) {
|
||||
return Response.success("Uploaded", getCacheEntry());
|
||||
String parsed;
|
||||
try {
|
||||
parsed = new String(response.data, HttpHeaderParser.parseCharset(response.headers));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
parsed = new String(response.data);
|
||||
}
|
||||
return Response.success(parsed, HttpHeaderParser.parseCacheHeaders(response));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user