HttpRequest Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. provisioning. device. transport. https. HttpRequest
- com.
public class HttpRequest
Constructor Summary
Constructor | Description | |
---|---|---|
HttpRequest() | ||
HttpRequest(URL url, HttpMethod method, byte[] body) |
Constructor. Takes a URL as an argument and returns an HTTPS request that is ready to be sent. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Http |
send()
Executes the HTTPS request. |
Http |
setHeaderField(String field, String value)
Sets the header field to the given value. |
Http |
setReadTimeoutMillis(int timeout)
Sets the read timeout, in milliseconds, for the request. The read timeout is the number of milliseconds after the server receives a request and before the server sends data back. |
Http |
setSSLContext(SSLContext sslContext) |
Constructor Details
HttpRequest
protected HttpRequest()
HttpRequest
public HttpRequest(URL url, HttpMethod method, byte[] body)
Constructor. Takes a URL as an argument and returns an HTTPS request that is ready to be sent.
Parameters:
Throws:
Method Details
send
public HttpResponse send()
Executes the HTTPS request.
Returns:
Throws:
setHeaderField
public HttpRequest setHeaderField(String field, String value)
Sets the header field to the given value.
Parameters:
Returns:
setReadTimeoutMillis
public HttpRequest setReadTimeoutMillis(int timeout)
Sets the read timeout, in milliseconds, for the request. The read timeout is the number of milliseconds after the server receives a request and before the server sends data back.
Parameters:
Returns:
setSSLContext
public HttpRequest setSSLContext(SSLContext sslContext)
Parameters:
Applies to
Azure SDK for Java