Search Results for

    Show / Hide Table of Contents

    Class BaseRestRequest

    Represents a request sent over HTTP.

    Inheritance
    System.Object
    BaseRestRequest
    Namespace: DisCatSharp.Net
    Assembly: DisCatSharp.dll
    Syntax
    public abstract class BaseRestRequest

    Properties

    | Improve this Doc View Source

    Discord

    Gets the discord client.

    Declaration
    protected BaseDiscordClient Discord { get; }
    Property Value
    Type Description
    BaseDiscordClient
    | Improve this Doc View Source

    Headers

    Gets the headers sent with this request.

    Declaration
    public IReadOnlyDictionary<string, string> Headers { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<System.String, System.String>
    | Improve this Doc View Source

    Method

    Gets the HTTP method used for this request.

    Declaration
    public RestRequestMethod Method { get; }
    Property Value
    Type Description
    RestRequestMethod
    | Improve this Doc View Source

    RateLimitWaitOverride

    Gets the override for the rate limit bucket wait time.

    Declaration
    public double? RateLimitWaitOverride { get; }
    Property Value
    Type Description
    System.Nullable<System.Double>
    | Improve this Doc View Source

    RequestTaskSource

    Gets the request task source.

    Declaration
    protected TaskCompletionSource<RestResponse> RequestTaskSource { get; }
    Property Value
    Type Description
    System.Threading.Tasks.TaskCompletionSource<RestResponse>
    | Improve this Doc View Source

    Route

    Gets the generic path (no parameters) for this request.

    Declaration
    public string Route { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    Url

    Gets the url to which this request is going to be made.

    Declaration
    public Uri Url { get; }
    Property Value
    Type Description
    System.Uri

    Methods

    | Improve this Doc View Source

    SetCompleted(RestResponse)

    Sets as completed.

    Declaration
    protected void SetCompleted(RestResponse response)
    Parameters
    Type Name Description
    RestResponse response

    The response to set.

    | Improve this Doc View Source

    SetFaulted(Exception)

    Sets as faulted.

    Declaration
    protected void SetFaulted(Exception ex)
    Parameters
    Type Name Description
    System.Exception ex

    The exception to set.

    | Improve this Doc View Source

    TrySetFaulted(Exception)

    Tries to set as faulted.

    Declaration
    protected bool TrySetFaulted(Exception ex)
    Parameters
    Type Name Description
    System.Exception ex

    The exception to set.

    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    WaitForCompletionAsync()

    Asynchronously waits for this request to complete.

    Declaration
    public Task<RestResponse> WaitForCompletionAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<RestResponse>

    HTTP response to this request.

    Extension Methods

    ReflectionUtilities.ToDictionary<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021-2022 Aiko IT Systems