public final class HttpUtility extends Object
Utility class for various HTTP operations.
| Modifier and Type | Method and Description |
|---|---|
static void |
validateStatusCode(URL url,
int code)
Checks if the status code is representing an HTTP OK response.
|
public static void validateStatusCode(URL url, int code)
Checks if the status code is representing an HTTP OK response. If the status
code is representing any other recognized HTTP status code that the API may return,
an exception is thrown which matches this status code. The URL
parameter is used to specify which address returned the status code.
url - the URLcode - the status codeCopyright © 2017. All rights reserved.