public class NetworkUtils extends Object
| Constructor | Description |
|---|---|
NetworkUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
static okhttp3.Response |
sendGetRequest(String url) |
Send get request.
|
static okhttp3.Response |
sendPostRequest(String url,
okhttp3.RequestBody body) |
Send post request.
|
static void |
sendPostRequest(String url,
okhttp3.RequestBody body,
GenericCallback callback) |
Send post request.
|
public static void sendPostRequest(String url, okhttp3.RequestBody body, GenericCallback callback)
url - the urlbody - the bodycallback - the callbackpublic static okhttp3.Response sendPostRequest(String url, okhttp3.RequestBody body) throws IOException
url - the urlbody - the bodyIOException - Signals that an I/O exception has occurred.public static okhttp3.Response sendGetRequest(String url) throws IOException
url - the urlIOException - Signals that an I/O exception has occurred.Copyright © 2018. All rights reserved.