-
- All Implemented Interfaces:
-
java.io.Serializable
public final class HttpRequest implements Serializable
Holds the information about an HTTP request performed by an HttpClient.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumHttpRequest.MethodSupported HTTP methods.
public classHttpRequest.BodySupported body values.
public classHttpRequest.Companionpublic final classHttpRequest.Builder
-
Field Summary
Fields Modifier and Type Field Description private final Stringurlprivate final HttpRequest.Methodmethodprivate final Map<String, String>headersprivate final HttpRequest.Bodybodyprivate final Bundleextrasprivate final DurationconnectTimeoutprivate final DurationreadTimeoutprivate final BooleanallowUserInteraction
-
Constructor Summary
Constructors Constructor Description HttpRequest(String url, HttpRequest.Method method, Map<String, String> headers, HttpRequest.Body body, Bundle extras, Duration connectTimeout, Duration readTimeout, Boolean allowUserInteraction)
-
Method Summary
Modifier and Type Method Description final StringgetUrl()final HttpRequest.MethodgetMethod()final Map<String, String>getHeaders()final HttpRequest.BodygetBody()final BundlegetExtras()final DurationgetConnectTimeout()final DurationgetReadTimeout()final BooleangetAllowUserInteraction()final HttpRequest.BuilderbuildUpon()-
-
Constructor Detail
-
HttpRequest
HttpRequest(String url, HttpRequest.Method method, Map<String, String> headers, HttpRequest.Body body, Bundle extras, Duration connectTimeout, Duration readTimeout, Boolean allowUserInteraction)
- Parameters:
url- Address of the remote resource to request.method- HTTP method to use for the request.headers- Additional HTTP headers to use.body- Content put in the body of the HTTP request.extras- Bundle of additional information, which might be used by a specific implementation of HTTPClient.connectTimeout- Timeout used when establishing a connection to the resource.readTimeout- Timeout used when reading the input stream.allowUserInteraction- If true, the user might be presented with interactive dialogs, such as popping up an authentication dialog.
-
-
Method Detail
-
getMethod
final HttpRequest.Method getMethod()
-
getHeaders
final Map<String, String> getHeaders()
-
getBody
final HttpRequest.Body getBody()
-
getConnectTimeout
final Duration getConnectTimeout()
-
getReadTimeout
final Duration getReadTimeout()
-
getAllowUserInteraction
final Boolean getAllowUserInteraction()
-
buildUpon
final HttpRequest.Builder buildUpon()
-
-
-
-