azure-docs-sdk-java/archive/docs-ref-autogen/com.microsoft.azure.sdk.iot...

172 строки
11 KiB
YAML

### YamlMime:JavaType
constructors:
- fullName: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.HttpRequest()
name: HttpRequest()
nameWithType: HttpRequest.HttpRequest()
syntax: protected HttpRequest()
uid: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.HttpRequest()
- fullName: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.HttpRequest(URL url, HttpMethod method, byte[] body, String authorizationToken)
name: HttpRequest(URL url, HttpMethod method, byte[] body, String authorizationToken)
nameWithType: HttpRequest.HttpRequest(URL url, HttpMethod method, byte[] body, String authorizationToken)
parameters:
- description: <p>The URL for the request. </p>
name: url
type: <xref href="URL?alt=URL&text=URL" data-throw-if-not-resolved="False"/>
- description: <p>The HTTPS request method (i.e. GET). </p>
name: method
type: <xref href="com.microsoft.azure.sdk.iot.service.transport.http.HttpMethod?alt=com.microsoft.azure.sdk.iot.service.transport.http.HttpMethod&text=HttpMethod" data-throw-if-not-resolved="False"/>
- description: <p>The request body. Must be an array of size 0 if the request method is GET or DELETE. </p>
name: body
type: <xref href="byte+%5B%5D?alt=byte+%5B%5D&text=byte+%5B%5D" data-throw-if-not-resolved="False"/>
- description: <p>The header value for the Authorization header.</p>
name: authorizationToken
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="IOException?alt=IOException&text=IOException" data-throw-if-not-resolved="False"/>
description: <p>This exception thrown if an IOException occurs in setting up the HTTPS connection. </p>
- type: <xref href="IllegalArgumentException?alt=IllegalArgumentException&text=IllegalArgumentException" data-throw-if-not-resolved="False"/>
description: <p>This exception thrown if the endpoint given does not use the HTTPS protocol. </p>
summary: >-
<p>Constructor. Takes a URL as an argument and returns an HTTPS request that is ready to be sent.</p>
<p></p>
syntax: public HttpRequest(URL url, HttpMethod method, byte[] body, String authorizationToken)
uid: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.HttpRequest(URL,HttpMethod,byte [],String)
- fullName: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.HttpRequest(URL url, HttpMethod method, byte[] body, String authorizationToken, Proxy proxy)
name: HttpRequest(URL url, HttpMethod method, byte[] body, String authorizationToken, Proxy proxy)
nameWithType: HttpRequest.HttpRequest(URL url, HttpMethod method, byte[] body, String authorizationToken, Proxy proxy)
parameters:
- description: <p>The URL for the request. </p>
name: url
type: <xref href="URL?alt=URL&text=URL" data-throw-if-not-resolved="False"/>
- description: <p>The HTTPS request method (i.e. GET). </p>
name: method
type: <xref href="com.microsoft.azure.sdk.iot.service.transport.http.HttpMethod?alt=com.microsoft.azure.sdk.iot.service.transport.http.HttpMethod&text=HttpMethod" data-throw-if-not-resolved="False"/>
- description: <p>The request body. Must be an array of size 0 if the request method is GET or DELETE. </p>
name: body
type: <xref href="byte+%5B%5D?alt=byte+%5B%5D&text=byte+%5B%5D" data-throw-if-not-resolved="False"/>
- description: <p>The header value for the Authorization header. </p>
name: authorizationToken
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>The proxy to send the request through. May be null if no proxy should be used</p>
name: proxy
type: <xref href="Proxy?alt=Proxy&text=Proxy" data-throw-if-not-resolved="False"/>
exceptions:
- type: <xref href="IOException?alt=IOException&text=IOException" data-throw-if-not-resolved="False"/>
description: <p>This exception thrown if an IOException occurs in setting up the HTTPS connection. </p>
- type: <xref href="IllegalArgumentException?alt=IllegalArgumentException&text=IllegalArgumentException" data-throw-if-not-resolved="False"/>
description: <p>This exception thrown if the endpoint given does not use the HTTPS protocol. </p>
summary: >-
<p>Constructor. Takes a URL as an argument and returns an HTTPS request that is ready to be sent through an optional proxy.</p>
<p></p>
syntax: public HttpRequest(URL url, HttpMethod method, byte[] body, String authorizationToken, Proxy proxy)
uid: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.HttpRequest(URL,HttpMethod,byte [],String,Proxy)
fields:
- field:
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
fullName: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.IF_MATCH
name: IF_MATCH
nameWithType: HttpRequest.IF_MATCH
syntax: public static final String IF_MATCH= "If-Match"
uid: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.IF_MATCH
- field:
type: <xref href="final+String?alt=final+String&text=final+String" data-throw-if-not-resolved="False"/>
fullName: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.REQUEST_ID
name: REQUEST_ID
nameWithType: HttpRequest.REQUEST_ID
syntax: public static final String REQUEST_ID= "Request-Id"
uid: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.REQUEST_ID
inheritances:
- <xref href="java.lang.Object" data-throw-if-not-resolved="False"/>
methods:
- fullName: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.send()
name: send()
nameWithType: HttpRequest.send()
exceptions:
- type: <xref href="IOException?alt=IOException&text=IOException" data-throw-if-not-resolved="False"/>
description: <p>This exception thrown if the connection could not be established, or the input/output streams could not be accessed. </p>
- type: <xref href="IotHubException?alt=IotHubException&text=IotHubException" data-throw-if-not-resolved="False"/>
description: <p>if the http request was successful, but IoT hub responded with an error code </p>
returns:
description: <p>The HTTPS response.</p>
type: <xref href="com.microsoft.azure.sdk.iot.service.transport.http.HttpResponse?alt=com.microsoft.azure.sdk.iot.service.transport.http.HttpResponse&text=HttpResponse" data-throw-if-not-resolved="False"/>
summary: >-
<p>Executes the HTTPS request.</p>
<p></p>
syntax: public HttpResponse send()
uid: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.send()
- fullName: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.setConnectTimeoutSeconds(int timeout)
name: setConnectTimeoutSeconds(int timeout)
nameWithType: HttpRequest.setConnectTimeoutSeconds(int timeout)
parameters:
- description: <p>the connect timeout </p>
name: timeout
type: <xref href="int?alt=int&text=int" data-throw-if-not-resolved="False"/>
returns:
description: <p>the object itself, for fluent setting. </p>
type: <xref href="com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest?alt=com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest&text=HttpRequest" data-throw-if-not-resolved="False"/>
summary: <p>Set the connect timeout, in seconds, for the request. The connect timeout is the allowed amount of time for the http connection to be established. </p>
syntax: public HttpRequest setConnectTimeoutSeconds(int timeout)
uid: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.setConnectTimeoutSeconds(int)
- fullName: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.setHeaderField(String field, String value)
name: setHeaderField(String field, String value)
nameWithType: HttpRequest.setHeaderField(String field, String value)
parameters:
- description: <p>The header field name. </p>
name: field
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
- description: <p>The header field value.</p>
name: value
type: <xref href="String?alt=String&text=String" data-throw-if-not-resolved="False"/>
returns:
description: <p>The object itself, for fluent setting. </p>
type: <xref href="com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest?alt=com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest&text=HttpRequest" data-throw-if-not-resolved="False"/>
summary: >-
<p>Sets the header field to the given value.</p>
<p></p>
syntax: public HttpRequest setHeaderField(String field, String value)
uid: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.setHeaderField(String,String)
- fullName: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.setHeaders(Map<String, String> headers)
name: setHeaders(Map<String, String> headers)
nameWithType: HttpRequest.setHeaders(Map<String, String> headers)
parameters:
- description: <p>The set of headers to use for this request</p>
name: headers
type: <xref href="Map%3CString%2C+String%3E?alt=Map%3CString%2C+String%3E&text=Map%3CString%2C+String%3E" data-throw-if-not-resolved="False"/>
returns:
description: <p>The object itself, for fluent setting. </p>
type: <xref href="com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest?alt=com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest&text=HttpRequest" data-throw-if-not-resolved="False"/>
summary: >-
<p>Sets the header field to the given value.</p>
<p></p>
syntax: public HttpRequest setHeaders(Map<String, String> headers)
uid: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.setHeaders(Map<String, String>)
- fullName: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.setReadTimeoutSeconds(int timeout)
name: setReadTimeoutSeconds(int timeout)
nameWithType: HttpRequest.setReadTimeoutSeconds(int timeout)
parameters:
- description: <p>The read timeout.</p>
name: timeout
type: <xref href="int?alt=int&text=int" data-throw-if-not-resolved="False"/>
returns:
description: <p>The object itself, for fluent setting. </p>
type: <xref href="com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest?alt=com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest&text=HttpRequest" data-throw-if-not-resolved="False"/>
summary: >-
<p>Sets the read timeout, in seconds, for the request. The read timeout is the number of milliseconds after the server receives a request and before the server sends data back.</p>
<p></p>
syntax: public HttpRequest setReadTimeoutSeconds(int timeout)
uid: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest.setReadTimeoutSeconds(int)
nameWithType: HttpRequest
syntax: public class HttpRequest
type: class
uid: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest
fullName: com.microsoft.azure.sdk.iot.service.transport.http.HttpRequest
name: HttpRequest
package: com.microsoft.azure.sdk.iot.service.transport.http
metadata: {}