Rest.GetAsync Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
GetAsync(String, Dictionary<String,String>, Int32, DownloadHandler, Boolean, CertificateHandler, Boolean)
Rest GET.
public static System.Threading.Tasks.Task<Microsoft.MixedReality.Toolkit.Utilities.Response> GetAsync (string query, System.Collections.Generic.Dictionary<string,string> headers = default, int timeout = -1, UnityEngine.Networking.DownloadHandler downloadHandler = default, bool readResponseData = false, UnityEngine.Networking.CertificateHandler certificateHandler = default, bool disposeCertificateHandlerOnDispose = true);
static member GetAsync : string * System.Collections.Generic.Dictionary<string, string> * int * UnityEngine.Networking.DownloadHandler * bool * UnityEngine.Networking.CertificateHandler * bool -> System.Threading.Tasks.Task<Microsoft.MixedReality.Toolkit.Utilities.Response>
Public Shared Function GetAsync (query As String, Optional headers As Dictionary(Of String, String) = Nothing, Optional timeout As Integer = -1, Optional downloadHandler As DownloadHandler = Nothing, Optional readResponseData As Boolean = false, Optional certificateHandler As CertificateHandler = Nothing, Optional disposeCertificateHandlerOnDispose As Boolean = true) As Task(Of Response)
Parameters
- query
- String
Finalized Endpoint Query with parameters.
- headers
- Dictionary<String,String>
Optional header information for the request.
- timeout
- Int32
Optional time in seconds before request expires.
- downloadHandler
- UnityEngine.Networking.DownloadHandler
Optional DownloadHandler for the request.
- readResponseData
- Boolean
Optional bool. If its true, response data will be read from web request download handler.
- certificateHandler
- UnityEngine.Networking.CertificateHandler
Optional certificate handler for custom certificate verification
- disposeCertificateHandlerOnDispose
- Boolean
Optional bool. If true and certificateHandler
is not null, certificateHandler
will be disposed, when the underlying UnityWebRequest is disposed.
Returns
The response data.
Applies to
MRTK2 Unity 2018 2.7.0 und andere Versionen
Produkt | Versionen |
---|---|
MRTK2 Unity 2018 | 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0 |
MRTK2 Unity 2019 | 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0 |
MRTK2 Unity 2020 | 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0 |
GetAsync(String, Dictionary<String,String>, Int32, DownloadHandler, Boolean, CertificateHandler, Boolean, CancellationToken)
Rest GET.
public static System.Threading.Tasks.Task<Microsoft.MixedReality.Toolkit.Utilities.Response> GetAsync (string query, System.Collections.Generic.Dictionary<string,string> headers = default, int timeout = -1, UnityEngine.Networking.DownloadHandler downloadHandler = default, bool readResponseData = false, UnityEngine.Networking.CertificateHandler certificateHandler = default, bool disposeCertificateHandlerOnDispose = true, System.Threading.CancellationToken cancellationToken = default);
static member GetAsync : string * System.Collections.Generic.Dictionary<string, string> * int * UnityEngine.Networking.DownloadHandler * bool * UnityEngine.Networking.CertificateHandler * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.MixedReality.Toolkit.Utilities.Response>
Public Shared Function GetAsync (query As String, Optional headers As Dictionary(Of String, String) = Nothing, Optional timeout As Integer = -1, Optional downloadHandler As DownloadHandler = Nothing, Optional readResponseData As Boolean = false, Optional certificateHandler As CertificateHandler = Nothing, Optional disposeCertificateHandlerOnDispose As Boolean = true, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)
Parameters
- query
- String
Finalized Endpoint Query with parameters.
- headers
- Dictionary<String,String>
Optional header information for the request.
- timeout
- Int32
Optional time in seconds before request expires.
- downloadHandler
- UnityEngine.Networking.DownloadHandler
Optional DownloadHandler for the request.
- readResponseData
- Boolean
Optional bool. If its true, response data will be read from web request download handler.
- certificateHandler
- UnityEngine.Networking.CertificateHandler
Optional certificate handler for custom certificate verification
- disposeCertificateHandlerOnDispose
- Boolean
Optional bool. If true and certificateHandler
is not null, certificateHandler
will be disposed, when the underlying UnityWebRequest is disposed.
- cancellationToken
- CancellationToken
Returns
The response data.
Applies to
MRTK2 Unity 2019 2.8.0 und MRTK2 Unity 2020 2.8.0
Produkt | Versionen |
---|---|
MRTK2 Unity 2019 | 2.8.0 |
MRTK2 Unity 2020 | 2.8.0 |