Package com.styra.opa.openapi.utils
Class HTTPRequest
- java.lang.Object
-
- com.styra.opa.openapi.utils.HTTPRequest
-
public class HTTPRequest extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description HTTPRequest(java.lang.String baseURL, java.lang.String method)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HTTPRequest
addHeader(java.lang.String key, java.lang.String value)
HTTPRequest
addHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>> map)
HTTPRequest
addQueryParam(java.lang.String name, java.lang.String value)
HTTPRequest
addQueryParam(org.apache.http.NameValuePair param)
HTTPRequest
addQueryParams(java.util.Collection<org.apache.http.NameValuePair> params)
java.net.http.HttpRequest
build()
void
setBody(java.util.Optional<SerializedBody> body)
-
-
-
Method Detail
-
setBody
public void setBody(java.util.Optional<SerializedBody> body)
-
addHeader
public HTTPRequest addHeader(java.lang.String key, java.lang.String value)
-
addHeaders
public HTTPRequest addHeaders(java.util.Map<java.lang.String,java.util.List<java.lang.String>> map)
-
addQueryParam
public HTTPRequest addQueryParam(java.lang.String name, java.lang.String value)
-
addQueryParam
public HTTPRequest addQueryParam(org.apache.http.NameValuePair param)
-
addQueryParams
public HTTPRequest addQueryParams(java.util.Collection<org.apache.http.NameValuePair> params)
-
build
public java.net.http.HttpRequest build()
-
-