Get response body in retrofit 2 without using pojo class

Suraj Bahadur
By -
0 minute read
0
Here is the way to get response return by hitting the web api in retrofit 2 without using pojo class

Before retrofit 2.0

String bodyString = new String(((TypedByteArray) response.getBody()).getBytes());

After retrofit 2.0

 String  bodyString = new String(response.body().bytes());
Tags:

Post a Comment

0Comments

Post a Comment (0)