Interface HTTPRequest.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<HTTPRequest.Builder,HTTPRequest>,SdkBuilder<HTTPRequest.Builder,HTTPRequest>,SdkPojo
- Enclosing class:
- HTTPRequest
public static interface HTTPRequest.Builder extends SdkPojo, CopyableBuilder<HTTPRequest.Builder,HTTPRequest>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HTTPRequest.BuilderclientIP(String clientIP)The IP address that the request originated from.HTTPRequest.Buildercountry(String country)The two-letter country code for the country that the request originated from.HTTPRequest.Builderheaders(Collection<HTTPHeader> headers)A complex type that contains two values for each header in the sampled web request: the name of the header and the value of the header.HTTPRequest.Builderheaders(Consumer<HTTPHeader.Builder>... headers)A complex type that contains two values for each header in the sampled web request: the name of the header and the value of the header.HTTPRequest.Builderheaders(HTTPHeader... headers)A complex type that contains two values for each header in the sampled web request: the name of the header and the value of the header.HTTPRequest.BuilderhttpVersion(String httpVersion)The HTTP version specified in the sampled web request, for example,HTTP/1.1.HTTPRequest.Buildermethod(String method)The HTTP method specified in the sampled web request.HTTPRequest.Builderuri(String uri)The part of a web request that identifies the resource, for example,/images/daily-ad.jpg.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
clientIP
HTTPRequest.Builder clientIP(String clientIP)
The IP address that the request originated from. If the
WebACLis associated with a CloudFront distribution, this is the value of one of the following fields in CloudFront access logs:-
c-ip, if the viewer did not use an HTTP proxy or a load balancer to send the request -
x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer to send the request
- Parameters:
clientIP- The IP address that the request originated from. If theWebACLis associated with a CloudFront distribution, this is the value of one of the following fields in CloudFront access logs:-
c-ip, if the viewer did not use an HTTP proxy or a load balancer to send the request -
x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer to send the request
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
country
HTTPRequest.Builder country(String country)
The two-letter country code for the country that the request originated from. For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2.
- Parameters:
country- The two-letter country code for the country that the request originated from. For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
uri
HTTPRequest.Builder uri(String uri)
The part of a web request that identifies the resource, for example,
/images/daily-ad.jpg.- Parameters:
uri- The part of a web request that identifies the resource, for example,/images/daily-ad.jpg.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
method
HTTPRequest.Builder method(String method)
The HTTP method specified in the sampled web request. CloudFront supports the following methods:
DELETE,GET,HEAD,OPTIONS,PATCH,POST, andPUT.- Parameters:
method- The HTTP method specified in the sampled web request. CloudFront supports the following methods:DELETE,GET,HEAD,OPTIONS,PATCH,POST, andPUT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
httpVersion
HTTPRequest.Builder httpVersion(String httpVersion)
The HTTP version specified in the sampled web request, for example,
HTTP/1.1.- Parameters:
httpVersion- The HTTP version specified in the sampled web request, for example,HTTP/1.1.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
headers
HTTPRequest.Builder headers(Collection<HTTPHeader> headers)
A complex type that contains two values for each header in the sampled web request: the name of the header and the value of the header.
- Parameters:
headers- A complex type that contains two values for each header in the sampled web request: the name of the header and the value of the header.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
headers
HTTPRequest.Builder headers(HTTPHeader... headers)
A complex type that contains two values for each header in the sampled web request: the name of the header and the value of the header.
- Parameters:
headers- A complex type that contains two values for each header in the sampled web request: the name of the header and the value of the header.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
headers
HTTPRequest.Builder headers(Consumer<HTTPHeader.Builder>... headers)
A complex type that contains two values for each header in the sampled web request: the name of the header and the value of the header.
This is a convenience method that creates an instance of theHTTPHeader.Builderavoiding the need to create one manually viaHTTPHeader.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#headers(List.) - Parameters:
headers- a consumer that will call methods onHTTPHeader.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#headers(java.util.Collection)
-
-