Show / Hide Table of Contents

    Class HttpWebRequest

    Provides an HTTP-specific implementation of the WebRequest class.

    Inheritance
    System.Object
    WebRequest
    HttpWebRequest
    Implements
    System.IDisposable
    Inherited Members
    WebRequest.UserAgent
    WebRequest.Create(Uri)
    WebRequest.Dispose()
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Eclo.nF.SIM800H
    Assembly: cs.temp.dll.dll
    Syntax
    public class HttpWebRequest : WebRequest, IDisposable
    Remarks

    This class does the main work of the request: it collects the header information from the user, exposes the Stream for outgoing entity data, and processes the incoming request. Implementation follows .NETMF System.Net.HttpWebRequest

    Constructors

    HttpWebRequest(Uri)

    Declaration
    public HttpWebRequest(Uri uri)
    Parameters
    Type Name Description
    Uri uri

    Properties

    AllowWriteStreamBuffering

    No effect in this platform. It's only implemented for compatibility with .NETMF.

    Declaration
    public bool AllowWriteStreamBuffering { get; set; }
    Property Value
    Type Description
    System.Boolean

    ContentLength

    No effect in this platform. It's only implemented for compatibility with .NETMF.

    Declaration
    public long ContentLength { get; set; }
    Property Value
    Type Description
    System.Int64

    ContentType

    Gets or sets the type of the entity body (the value of the content type).

    Declaration
    public string ContentType { get; set; }
    Property Value
    Type Description
    System.String

    The value of the Content-type HTTP header. The default value is null.

    Remarks

    Setting to null clears the content-type.

    Data

    Data to be sent in the request. Only valid for POST requests.

    Declaration
    public string Data { get; set; }
    Property Value
    Type Description
    System.String

    Headers

    A collection of HTTP headers stored as name/value pairs.

    Declaration
    public WebHeaderCollection Headers { get; set; }
    Property Value
    Type Description
    WebHeaderCollection

    A WebHeaderCollection that contains the name/value pairs that make up the headers for the HTTP request.

    Remarks

    The following header values are set through properties on the HttpWebRequest class: Accept, Connection, Content-Length, Content-Type, Expect, Range, Referrer, Transfer-Encoding, and User-Agent. Trying to set these header values by using WebHeaderCollection.Add(String, String)() will raise an exception. Date and Host are set internally.

    KeepAlive

    No effect in this platform. It's only implemented for compatibility with .NETMF.

    Declaration
    public bool KeepAlive { get; set; }
    Property Value
    Type Description
    System.Boolean

    Method

    Gets or sets the HTTP method of this request. Supported methods: POST, GET, HEAD and DELETE.

    Declaration
    public string Method { get; set; }
    Property Value
    Type Description
    System.String

    The request method to use to contact the Internet resource. The default value is GET.

    Remarks

    This method represents the initial origin verb, which is unchanged and unaffected by redirects.

    RequestUri

    Gets the original Uniform Resource Identifier (URI) of the request.

    Declaration
    public Uri RequestUri { get; }
    Property Value
    Type Description
    Uri

    A Uri that contains the URI of the Internet resource passed to the WebRequest.Create(Uri) method.

    Remarks

    The URI object was created by the constructor and is always non-null. The URI object will always be the base URI, because automatic re-directs aren't supported.

    Methods

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    WebRequest.Dispose(Boolean)

    GetRequestStream()

    Implemented here for compatibility with .NETMF System.Net.HttpWebRequest. *** WARNING: DO NOT explicitly dispose the stream otherwise the request will be executed empty ***

    Declaration
    public InMemoryRandomAccessStream GetRequestStream()
    Returns
    Type Description
    InMemoryRandomAccessStream

    A Stream to use to write request data.

    Remarks

    Used for POST requests.

    GetResponse()

    Declaration
    public HttpWebResponse GetResponse()
    Returns
    Type Description
    HttpWebResponse

    Implements

    System.IDisposable
    Back to top Copyright © 2018 Eclo Solutions
    Generated by DocFX