Class Request
- java.lang.Object
-
- com.mongodb.stitch.core.internal.net.Request
-
public final class Request extends Object
A request to perform against a remote server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Request.Builder
A builder that can buildRequest
s.
-
Method Summary
Modifier and Type Method Description boolean
equals(Object object)
byte[]
getBody()
Returns a copy of the body that will be sent along with the request.Map<String,String>
getHeaders()
Returns the headers that will be included in the request.Method
getMethod()
Returns the HTTP method of the request.Long
getTimeout()
Returns the number of milliseconds that the underlying transport should spend on an HTTP round trip before failing with an error.String
getUrl()
Returns the URL that the request will be performed against.int
hashCode()
-
-
-
Method Detail
-
getUrl
public String getUrl()
Returns the URL that the request will be performed against.- Returns:
- the URL that the request will be performed against.
-
getTimeout
public Long getTimeout()
Returns the number of milliseconds that the underlying transport should spend on an HTTP round trip before failing with an error.- Returns:
- the number of milliseconds that the underlying transport should spend on an HTTP round trip before failing with an error.
-
getHeaders
public Map<String,String> getHeaders()
Returns the headers that will be included in the request.- Returns:
- the headers that will be included in the request.
-
getBody
public byte[] getBody()
Returns a copy of the body that will be sent along with the request.- Returns:
- a copy of the body that will be sent along with the request.
-
getMethod
public Method getMethod()
Returns the HTTP method of the request.- Returns:
- the HTTP method of the request.
-
-