mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0releases/2.3.0releases/2.4.0releases/2.5.0releases/2.5.1releases/2.5.2releases/2.5.3

We've moved!

Starting from MRTK 2.6, we are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the MRTK-Unity section of the dot net API explorer. Existing content will remain here but will not be updated further.

Search Results for

    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.

    In This Article
    • Methods
      • DeleteAsync(String, Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)
      • GetAsync(String, Dictionary<String, String>, Int32, DownloadHandler, Boolean, CertificateHandler, Boolean)
      • GetBasicAuthentication(String, String)
      • GetBearerOAuthToken(String)
      • PostAsync(String, Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)
      • PostAsync(String, Byte[], Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)
      • PostAsync(String, String, Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)
      • PostAsync(String, WWWForm, Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)
      • PutAsync(String, Byte[], Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)
      • PutAsync(String, String, Dictionary<String, String>, Int32, Boolean, CertificateHandler, Boolean)
    Back to top Generated by DocFX