extend CommonRequest for GsonRequest
This commit is contained in:
@@ -32,6 +32,10 @@ public class CommonRequest {
|
||||
return request.execute().returnContent().asString();
|
||||
}
|
||||
|
||||
public Number asNumber() throws IOException {
|
||||
return Double.parseDouble(asString());
|
||||
}
|
||||
|
||||
public byte[] asBytes() throws IOException {
|
||||
return request.execute().returnContent().asBytes();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user