Search Results for

    Show / Hide Table of Contents

    Struct AlgoApiRequest

    A wrapper around for handling requests to Algorand REST services.

    Namespace: Algorand.Unity
    Assembly: cs.temp.dll.dll
    Syntax
    public struct AlgoApiRequest

    Methods

    Delete(String)

    Create a DELETE request

    Declaration
    public static AlgoApiRequest Delete(string url)
    Parameters
    Type Name Description
    String url

    The url for this request

    Returns
    Type Description
    AlgoApiRequest

    A new DELETE request

    Get(String)

    Create a GET request

    Declaration
    public static AlgoApiRequest Get(string url)
    Parameters
    Type Name Description
    String url

    The url for this request

    Returns
    Type Description
    AlgoApiRequest

    A new GET request

    Post(String)

    Create a POST request

    Declaration
    public static AlgoApiRequest Post(string url)
    Parameters
    Type Name Description
    String url

    The url for this request

    Returns
    Type Description
    AlgoApiRequest

    A new POST request

    Send(CancellationToken)

    Send the request.

    Declaration
    public AlgoApiRequest.Sent Send(CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    An optional cancellation token

    Returns
    Type Description
    AlgoApiRequest.Sent

    A AlgoApiRequest.Sent request

    Send<TProgress>(TProgress, CancellationToken)

    Send the request and check progress callbacks using IProgress<T>

    Declaration
    public AlgoApiRequest.SentWithProgress<TProgress> Send<TProgress>(TProgress progress, CancellationToken cancellationToken = null)
        where TProgress : IProgress<float>
    Parameters
    Type Name Description
    TProgress progress

    The progress callback

    CancellationToken cancellationToken

    An optional cancellation token

    Returns
    Type Description
    AlgoApiRequest.SentWithProgress<TProgress>

    A AlgoApiRequest.SentWithProgress<TProgress> request

    Type Parameters
    Name Description
    TProgress

    A progress callback implementing IProgress<T>

    SetHeaders(Header[])

    Set additional headers on this request

    Declaration
    public AlgoApiRequest SetHeaders(params Header[] headers)
    Parameters
    Type Name Description
    Header[] headers

    The headers in format "key:value"

    Returns
    Type Description
    AlgoApiRequest

    this request with headers set

    SetJsonBody(NativeText)

    Set body of the request, and set its content type header to "application/json"

    Declaration
    public AlgoApiRequest SetJsonBody(NativeText json)
    Parameters
    Type Name Description
    NativeText json

    The utf8 json to set the body of the request

    Returns
    Type Description
    AlgoApiRequest

    this request with body and header set

    SetJsonBody(String)

    Set body of the request, and set its content type header to "application/json"

    Declaration
    public AlgoApiRequest SetJsonBody(string json)
    Parameters
    Type Name Description
    String json

    The utf8 json to set the body of the request

    Returns
    Type Description
    AlgoApiRequest

    this request with body and header set

    SetJsonBody<TBody>(TBody)

    Set body of the request, and set its content type header to "application/json"

    Declaration
    public AlgoApiRequest SetJsonBody<TBody>(TBody value)
    Parameters
    Type Name Description
    TBody value

    An object to serialize into json, then to set in the body of the request

    Returns
    Type Description
    AlgoApiRequest

    this request with body and header set

    Type Parameters
    Name Description
    TBody

    Type of the object to serialize

    SetMessagePackBody(NativeArray<Byte>.ReadOnly)

    Set body of the request and set its content type header to "application/msgpack"

    Declaration
    public AlgoApiRequest SetMessagePackBody(NativeArray<byte>.ReadOnly bytes)
    Parameters
    Type Name Description
    NativeArray.ReadOnly<> bytes

    The msgpack bytes to set for the body

    Returns
    Type Description
    AlgoApiRequest

    this request with body and header set

    SetMessagePackBody(Byte[])

    Set body of the request and set its content type header to "application/msgpack"

    Declaration
    public AlgoApiRequest SetMessagePackBody(byte[] bytes)
    Parameters
    Type Name Description
    Byte[] bytes

    The msgpack bytes to set for the body

    Returns
    Type Description
    AlgoApiRequest

    this request with body and header set

    SetMessagePackBody<TBody>(TBody)

    Set body of the request and set its content type header to "application/msgpack"

    Declaration
    public AlgoApiRequest SetMessagePackBody<TBody>(TBody value)
    Parameters
    Type Name Description
    TBody value

    The value to serialize to message pack and set for the body

    Returns
    Type Description
    AlgoApiRequest

    this request with body and header set

    Type Parameters
    Name Description
    TBody

    SetPlainTextBody(Byte[])

    Set body of the request, and set its content type header to "application/text"

    Declaration
    public AlgoApiRequest SetPlainTextBody(byte[] plainText)
    Parameters
    Type Name Description
    Byte[] plainText

    The utf8 plaintext to use for the body

    Returns
    Type Description
    AlgoApiRequest

    this request with body and header set

    SetPlainTextBody(String)

    Set body of the request, and set its content type header to "application/text"

    Declaration
    public AlgoApiRequest SetPlainTextBody(string plainText)
    Parameters
    Type Name Description
    String plainText

    The utf8 plaintext to use for the body

    Returns
    Type Description
    AlgoApiRequest

    this request with body and header set

    SetRawBody(Byte[], ContentType)

    Set the body and content type header of the request

    Declaration
    public AlgoApiRequest SetRawBody(byte[] data, ContentType contentType)
    Parameters
    Type Name Description
    Byte[] data

    The raw bytes to set for the body

    ContentType contentType

    The content type to set the header of the request

    Returns
    Type Description
    AlgoApiRequest

    this request with body and header set

    SetToken(String, String)

    Set the token used for authenticating to the service.

    Declaration
    public AlgoApiRequest SetToken(string tokenHeader, string token)
    Parameters
    Type Name Description
    String tokenHeader

    The name of the request header used for the token.

    String token

    The token used for authenticating to the service.

    Returns
    Type Description
    AlgoApiRequest

    with token set

    ☀
    ☾
    In This Article
    Back to top
    Generated by DocFX
    ☀
    ☾