日本語翻訳ドキュメントはサポートを終了しました

MRTK 2.6 以降のドキュメントについては、公式の Microsoft ドキュメント を参照してください。

    Show / Hide Table of Contents

    Class Rest

    REST Class for CRUD Transactions.

    Inheritance
    Object
    Rest
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.Utilities
    Assembly: cs.temp.dll.dll
    Syntax
    public static class Rest

    Methods

    DeleteAsync(String, Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)

    Rest DELETE.

    Declaration
    public static Task<Response> DeleteAsync(string query, Dictionary<string, string> headers = null, int timeout = -1, bool readResponseData = false, CertificateHandler certificateHandler = null, bool disposeCertificateHandlerOnDispose = true)
    Parameters
    Type Name Description
    String query

    Finalized Endpoint Query with parameters.

    Dictionary<String, String> headers

    Optional header information for the request.

    Int32 timeout

    Optional time in seconds before request expires.

    Boolean readResponseData

    Optional bool. If its true, response data will be read from web request download handler.

    CertificateHandler certificateHandler

    Optional certificate handler for custom certificate verification

    Boolean disposeCertificateHandlerOnDispose

    Optional bool. If true and certificateHandler is not null, certificateHandler will be disposed, when the underlying UnityWebRequest is disposed.

    Returns
    Type Description
    Task<Response>

    The response data.

    GetAsync(String, Dictionary<String, String>, Int32, DownloadHandler, Boolean, CertificateHandler, Boolean)

    Rest GET.

    Declaration
    public static Task<Response> GetAsync(string query, Dictionary<string, string> headers = null, int timeout = -1, DownloadHandler downloadHandler = null, bool readResponseData = false, CertificateHandler certificateHandler = null, bool disposeCertificateHandlerOnDispose = true)
    Parameters
    Type Name Description
    String query

    Finalized Endpoint Query with parameters.

    Dictionary<String, String> headers

    Optional header information for the request.

    Int32 timeout

    Optional time in seconds before request expires.

    DownloadHandler downloadHandler

    Optional DownloadHandler for the request.

    Boolean readResponseData

    Optional bool. If its true, response data will be read from web request download handler.

    CertificateHandler certificateHandler

    Optional certificate handler for custom certificate verification

    Boolean disposeCertificateHandlerOnDispose

    Optional bool. If true and certificateHandler is not null, certificateHandler will be disposed, when the underlying UnityWebRequest is disposed.

    Returns
    Type Description
    Task<Response>

    The response data.

    GetBasicAuthentication(String, String)

    Gets the Basic auth header.

    Declaration
    public static string GetBasicAuthentication(string username, string password)
    Parameters
    Type Name Description
    String username

    The Username.

    String password

    The password.

    Returns
    Type Description
    String

    The Basic authorization header encoded to base 64.

    GetBearerOAuthToken(String)

    Gets the Bearer auth header.

    Declaration
    public static string GetBearerOAuthToken(string authToken)
    Parameters
    Type Name Description
    String authToken

    OAuth Token to be used.

    Returns
    Type Description
    String

    The Bearer authorization header.

    PostAsync(String, Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)

    Rest POST.

    Declaration
    public static Task<Response> PostAsync(string query, Dictionary<string, string> headers = null, int timeout = -1, bool readResponseData = false, CertificateHandler certificateHandler = null, bool disposeCertificateHandlerOnDispose = true)
    Parameters
    Type Name Description
    String query

    Finalized Endpoint Query with parameters.

    Dictionary<String, String> headers

    Optional header information for the request.

    Int32 timeout

    Optional time in seconds before request expires.

    Boolean readResponseData

    Optional bool. If its true, response data will be read from web request download handler.

    CertificateHandler certificateHandler

    Optional certificate handler for custom certificate verification

    Boolean disposeCertificateHandlerOnDispose

    Optional bool. If true and certificateHandler is not null, certificateHandler will be disposed, when the underlying UnityWebRequest is disposed.

    Returns
    Type Description
    Task<Response>

    The response data.

    PostAsync(String, Byte[], Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)

    Rest POST.

    Declaration
    public static Task<Response> PostAsync(string query, byte[] bodyData, Dictionary<string, string> headers = null, int timeout = -1, bool readResponseData = false, CertificateHandler certificateHandler = null, bool disposeCertificateHandlerOnDispose = true)
    Parameters
    Type Name Description
    String query

    Finalized Endpoint Query with parameters.

    Byte[] bodyData

    The raw data to post.

    Dictionary<String, String> headers

    Optional header information for the request.

    Int32 timeout

    Optional time in seconds before request expires.

    Boolean readResponseData

    Optional bool. If its true, response data will be read from web request download handler.

    CertificateHandler certificateHandler

    Optional certificate handler for custom certificate verification

    Boolean disposeCertificateHandlerOnDispose

    Optional bool. If true and certificateHandler is not null, certificateHandler will be disposed, when the underlying UnityWebRequest is disposed.

    Returns
    Type Description
    Task<Response>

    The response data.

    PostAsync(String, String, Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)

    Rest POST.

    Declaration
    public static Task<Response> PostAsync(string query, string jsonData, Dictionary<string, string> headers = null, int timeout = -1, bool readResponseData = false, CertificateHandler certificateHandler = null, bool disposeCertificateHandlerOnDispose = true)
    Parameters
    Type Name Description
    String query

    Finalized Endpoint Query with parameters.

    String jsonData

    JSON data for the request.

    Dictionary<String, String> headers

    Optional header information for the request.

    Int32 timeout

    Optional time in seconds before request expires.

    Boolean readResponseData

    Optional bool. If its true, response data will be read from web request download handler.

    CertificateHandler certificateHandler

    Optional certificate handler for custom certificate verification

    Boolean disposeCertificateHandlerOnDispose

    Optional bool. If true and certificateHandler is not null, certificateHandler will be disposed, when the underlying UnityWebRequest is disposed.

    Returns
    Type Description
    Task<Response>

    The response data.

    PostAsync(String, WWWForm, Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)

    Rest POST.

    Declaration
    public static Task<Response> PostAsync(string query, WWWForm formData, Dictionary<string, string> headers = null, int timeout = -1, bool readResponseData = false, CertificateHandler certificateHandler = null, bool disposeCertificateHandlerOnDispose = true)
    Parameters
    Type Name Description
    String query

    Finalized Endpoint Query with parameters.

    WWWForm formData

    Form Data.

    Dictionary<String, String> headers

    Optional header information for the request.

    Int32 timeout

    Optional time in seconds before request expires.

    Boolean readResponseData

    Optional bool. If its true, response data will be read from web request download handler.

    CertificateHandler certificateHandler

    Optional certificate handler for custom certificate verification

    Boolean disposeCertificateHandlerOnDispose

    Optional bool. If true and certificateHandler is not null, certificateHandler will be disposed, when the underlying UnityWebRequest is disposed.

    Returns
    Type Description
    Task<Response>

    The response data.

    PutAsync(String, Byte[], Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)

    Rest PUT.

    Declaration
    public static Task<Response> PutAsync(string query, byte[] bodyData, Dictionary<string, string> headers = null, int timeout = -1, bool readResponseData = false, CertificateHandler certificateHandler = null, bool disposeCertificateHandlerOnDispose = true)
    Parameters
    Type Name Description
    String query

    Finalized Endpoint Query with parameters.

    Byte[] bodyData

    Data to be submitted.

    Dictionary<String, String> headers

    Optional header information for the request.

    Int32 timeout

    Optional time in seconds before request expires.

    Boolean readResponseData

    Optional bool. If its true, response data will be read from web request download handler.

    CertificateHandler certificateHandler

    Optional certificate handler for custom certificate verification

    Boolean disposeCertificateHandlerOnDispose

    Optional bool. If true and certificateHandler is not null, certificateHandler will be disposed, when the underlying UnityWebRequest is disposed.

    Returns
    Type Description
    Task<Response>

    The response data.

    PutAsync(String, String, Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)

    Rest PUT.

    Declaration
    public static Task<Response> PutAsync(string query, string jsonData, Dictionary<string, string> headers = null, int timeout = -1, bool readResponseData = false, CertificateHandler certificateHandler = null, bool disposeCertificateHandlerOnDispose = true)
    Parameters
    Type Name Description
    String query

    Finalized Endpoint Query with parameters.

    String jsonData

    Data to be submitted.

    Dictionary<String, String> headers

    Optional header information for the request.

    Int32 timeout

    Optional time in seconds before request expires.

    Boolean readResponseData

    Optional bool. If its true, response data will be read from web request download handler.

    CertificateHandler certificateHandler

    Optional certificate handler for custom certificate verification

    Boolean disposeCertificateHandlerOnDispose

    Optional bool. If true and certificateHandler is not null, certificateHandler will be disposed, when the underlying UnityWebRequest is disposed.

    Returns
    Type Description
    Task<Response>

    The response data.

    Back to top Generated by DocFX