Package com.moesif.api.http.request
Class HttpRequest
java.lang.Object
com.moesif.api.http.request.HttpRequest
- Direct Known Subclasses:
HttpBodyRequest
-
Constructor Summary
ConstructorsConstructorDescriptionHttpRequest(HttpMethod _method, String _queryUrl, Map<String, String> _headers, Map<String, Object> _parameters) Initializes a simple http requestHttpRequest(HttpMethod _method, String _queryUrl, Map<String, String> _headers, Map<String, Object> _parameters, String _username, String _password) Initializes a simple http request -
Method Summary
Modifier and TypeMethodDescriptionHeaders for the http requestHeaders for the http requestParameters for the http requestPassword for basic authenticationQuery url for the http requestUsername for basic authentication
-
Constructor Details
-
HttpRequest
public HttpRequest(HttpMethod _method, String _queryUrl, Map<String, String> _headers, Map<String, Object> _parameters) Initializes a simple http request- Parameters:
_method- The HTTP method to use. Can be GET, HEAD, 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_parameters- The form data values in a key-value map
-
HttpRequest
public HttpRequest(HttpMethod _method, String _queryUrl, Map<String, String> _headers, Map<String, Object> _parameters, String _username, String _password) Initializes a simple http request- Parameters:
_method- The HTTP method to use. Can be GET, HEAD, 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_parameters- The form data values in a key-value map_username- Username for basic authentication_password- Password for basic authentication
-
-
Method Details
-
getHttpMethod
Headers for the http request- Returns:
- the HTTP method/verb
-
getHeaders
Headers for the http request- Returns:
- the HTTP request headers
-
getQueryUrl
Query url for the http request- Returns:
- the query url
-
getParameters
Parameters for the http request- Returns:
- the parameters as a map
-
getUsername
Username for basic authentication- Returns:
- the username part for basic auth
-
getPassword
Password for basic authentication- Returns:
- the password part for basic auth
-