HTTP API Toolkit HTTP API Toolkit
HTTP API Toolkit HTTP API Toolkit
DocFX + Singulink = ♥

Search Results for

    Method SetRequestTimeout

    SetRequestTimeout(HttpRequestMessage, TimeSpan)

    Sets how long the request can take when it is sent with one of the SendAsync or SendStreamingAsync methods, instead of RequestTimeout. The timeout covers the same part of the request as RequestTimeout: from sending it, including its content, until the response is read, or until the response starts for a streaming response or a request that returns the HttpResponseMessage itself.

    Declaration
    protected static void SetRequestTimeout(HttpRequestMessage request, TimeSpan timeout)
    Parameters
    Type Name Description
    HttpRequestMessage request

    The request.

    TimeSpan timeout

    How long the request can take. InfiniteTimeSpan and values longer than MaxValue milliseconds (about 24.8 days) mean no timeout.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    timeout is zero, or negative other than InfiniteTimeSpan.

    © Singulink. All rights reserved.