public class ArkHttpClient extends Object implements Closeable
Constructor and Description |
---|
ArkHttpClient(String address)
Connect to the server.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
delete(String url)
Execute the DELETE request.
|
String |
get(String uri)
Execute the GET request.
|
String |
post(String url,
String json)
Execute the POST request.
|
String |
put(String url,
String json)
Execute the PUT request.
|
public ArkHttpClient(String address)
address
- HTTP URI (e.g. http://127.0.0.1:8080)public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public String get(String uri) throws IOException
uri
- HTTP URIIOException
- if an I/O error occurspublic String post(String url, String json) throws IOException
url
- HTTP URIjson
- request entityIOException
- if an I/O error occurspublic String put(String url, String json) throws IOException
url
- HTTP URIjson
- request entityIOException
- if an I/O error occurspublic String delete(String url) throws IOException
url
- HTTP URIIOException
- if an I/O error occursCopyright © 2019. All rights reserved.