public class ManUrlExt extends Object
| Constructor and Description |
|---|
ManUrlExt() |
| Modifier and Type | Method and Description |
|---|---|
static String |
encode(String urlPart)
Convenience method to encode a URL string and not have to handle the
UnsupportedEncodingException.
|
static byte[] |
getBinaryContent(URL thiz) |
static Bindings |
getJsonContent(URL thiz) |
static String |
getTextContent(URL thiz) |
static URL |
makeUrl(String url,
Bindings arguments)
Make a JSON-compatible URL with the arguments from the
Bindings. |
static Bindings |
postForJsonContent(URL url,
Bindings bindings)
Use HTTP POST to pass JSON bindings to
this URL and get the full content as a JSON object.
|
static String |
postForTextContent(URL url,
Bindings bindings)
Use HTTP POST to pass JSON bindings to
this URL and get back the full content as a String.
|
public static String encode(String urlPart)
public static String postForTextContent(URL url, Bindings bindings)
postForJsonContent(URL, Bindings)public static Bindings postForJsonContent(URL url, Bindings bindings)
postForTextContent(URL, Bindings)public static String getTextContent(URL thiz)
public static byte[] getBinaryContent(URL thiz)
public static Bindings getJsonContent(URL thiz)
RuntimeException results if the
content is not a JSON document.Json.fromJson(String)Copyright © 2019. All rights reserved.