Innovt Platform
Search Results for

    Show / Hide Table of Contents

    Class Extensions

    Provides a set of extension methods for working with URIs and HTTP requests.

    Inheritance
    object
    Extensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Innovt.Core.Http
    Assembly: Innovt.Core.dll
    Syntax
    public static class Extensions

    Methods

    | Edit this page View Source

    AddBody(HttpWebRequest, string)

    Adds a request body to an HTTP request.

    Declaration
    public static HttpWebRequest AddBody(this HttpWebRequest request, string dataToSend)
    Parameters
    Type Name Description
    HttpWebRequest request

    The HTTP request to which the body will be added.

    string dataToSend

    The data to include in the request body.

    Returns
    Type Description
    HttpWebRequest

    The modified HTTP request with the added request body.

    | Edit this page View Source

    AddHeader(HttpWebRequest, NameValueCollection)

    Adds headers to an HTTP request.

    Declaration
    public static HttpWebRequest AddHeader(this HttpWebRequest request, NameValueCollection headerData)
    Parameters
    Type Name Description
    HttpWebRequest request

    The HTTP request to which headers will be added.

    NameValueCollection headerData

    The collection of headers to add to the request.

    Returns
    Type Description
    HttpWebRequest

    The modified HTTP request with added headers.

    | Edit this page View Source

    AppendResourceUri(Uri, string)

    Appends a resource path to the base URI.

    Declaration
    public static Uri AppendResourceUri(this Uri baseUri, string resource)
    Parameters
    Type Name Description
    Uri baseUri

    The base URI to which the resource path will be appended.

    string resource

    The resource path to append.

    Returns
    Type Description
    Uri

    A new URI containing the base URI with the appended resource path.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the baseUri is null.

    Exception

    Thrown if the URL cannot be created.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX