Package com.moesif.api.http.request
Class HttpRequest
- java.lang.Object
-
- com.moesif.api.http.request.HttpRequest
-
- Direct Known Subclasses:
HttpBodyRequest
public class HttpRequest extends Object
-
-
Constructor Summary
Constructors Constructor Description HttpRequest(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getHeaders()Headers for the http requestHttpMethodgetHttpMethod()Headers for the http requestMap<String,Object>getParameters()Parameters for the http requestStringgetPassword()Password for basic authenticationStringgetQueryUrl()Query url for the http requestStringgetUsername()Username for basic authentication
-
-
-
Constructor Detail
-
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 Detail
-
getHttpMethod
public HttpMethod getHttpMethod()
Headers for the http request- Returns:
- the HTTP method/verb
-
getHeaders
public Map<String,String> getHeaders()
Headers for the http request- Returns:
- the HTTP request headers
-
getQueryUrl
public String getQueryUrl()
Query url for the http request- Returns:
- the query url
-
getParameters
public Map<String,Object> getParameters()
Parameters for the http request- Returns:
- the parameters as a map
-
getUsername
public String getUsername()
Username for basic authentication- Returns:
- the username part for basic auth
-
getPassword
public String getPassword()
Password for basic authentication- Returns:
- the password part for basic auth
-
-