Package org.basex.util.http
Class HttpClient
java.lang.Object
org.basex.util.http.HttpClient
HTTP Client.
- Author:
- BaseX Team 2005-21, BSD License, Rositsa Shadura, Michael Seiferle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EnumMap<HttpText.Request,String> authHeaders(String auth) Returns the authentication headers.sendRequest(byte[] href, ANode request, Value bodies) Sends an HTTP request and returns the response.static voidwritePayload(OutputStream out, HttpRequest request) Writes the HTTP request payload.
-
Constructor Details
-
HttpClient
Constructor.- Parameters:
info- input infooptions- database options
-
-
Method Details
-
sendRequest
Sends an HTTP request and returns the response.- Parameters:
href- URL to send the request torequest- request databodies- request body- Returns:
- HTTP response
- Throws:
QueryException- query exception
-
authHeaders
Returns the authentication headers.- Parameters:
auth- authorization string- Returns:
- values values
-
writePayload
Writes the HTTP request payload.- Parameters:
out- output streamrequest- request data- Throws:
IOException- I/O exception
-