Package com.moesif.api.http.request
Class HttpBodyRequest
- java.lang.Object
-
- com.moesif.api.http.request.HttpRequest
-
- com.moesif.api.http.request.HttpBodyRequest
-
public class HttpBodyRequest extends HttpRequest
-
-
Constructor Summary
Constructors Constructor Description HttpBodyRequest(HttpMethod _method, String _queryUrl, Map<String,String> _headers, String _body)Create a request with explicit bodyHttpBodyRequest(HttpMethod _method, String _queryUrl, Map<String,String> _headers, String _body, String _username, String _password)Create a request with explicit body
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBody()Body for the http request-
Methods inherited from class com.moesif.api.http.request.HttpRequest
getHeaders, getHttpMethod, getParameters, getPassword, getQueryUrl, getUsername
-
-
-
-
Constructor Detail
-
HttpBodyRequest
public HttpBodyRequest(HttpMethod _method, String _queryUrl, Map<String,String> _headers, String _body)
Create a request with explicit body- Parameters:
_method- The HTTP method to use. Can be PUT, POST, DELETE and PATCH_queryUrl- The http url to create the HTTP Request. Expect a fully qualified absolute Url_headers- The key-value map of all http headers to be sent_body- The object to be sent as body after serialization
-
HttpBodyRequest
public HttpBodyRequest(HttpMethod _method, String _queryUrl, Map<String,String> _headers, String _body, String _username, String _password)
Create a request with explicit body- Parameters:
_method- The HTTP method to use. Can be PUT, POST, DELETE and PATCH_queryUrl- The http url to create the HTTP Request. Expect a fully qualified absolute Url_headers- The key-value map of all http headers to be sent_body- The object to be sent as body after serialization_username- Username for basic authentication_password- Password for basic authentication
-
-
Method Detail
-
getBody
public String getBody()
Body for the http request- Returns:
- the request body as a string
-
-