Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

StringContent Class

Provides HTTP content based on a string.

Namespace:  System.Net.Http
Assembly:  System.Net.Http (in System.Net.Http.dll)
public class StringContent : ByteArrayContent

The StringContent type exposes the following members.

  NameDescription
Public methodStringContent(String)Initializes a new instance of the StringContent class.
Public methodStringContent(String, Encoding)Initializes a new instance of the StringContent class.
Public methodStringContent(String, Encoding, String)Initializes a new instance of the StringContent class.
Top
  NameDescription
Public propertyHeadersGets the HTTP content headers as defined in RFC 2616. (Inherited from HttpContent.)
Top
  NameDescription
Public methodCopyToAsync(Stream)Write the HTTP content to a stream as an asynchronous operation. (Inherited from HttpContent.)
Public methodCopyToAsync(Stream, TransportContext)Write the HTTP content to a stream as an asynchronous operation. (Inherited from HttpContent.)
Protected methodCreateContentReadStreamAsync (Inherited from ByteArrayContent.)
Public methodDispose()Releases the unmanaged resources and disposes of the managed resources used by the HttpContent. (Inherited from HttpContent.)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the HttpContent and optionally disposes of the managed resources. (Inherited from HttpContent.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodLoadIntoBufferAsync()Serialize the HTTP content to a memory buffer as an asynchronous operation. (Inherited from HttpContent.)
Public methodLoadIntoBufferAsync(Int64) (Inherited from HttpContent.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodReadAsByteArrayAsync (Inherited from HttpContent.)
Public methodReadAsStreamAsync (Inherited from HttpContent.)
Public methodReadAsStringAsync (Inherited from HttpContent.)
Protected methodSerializeToStreamAsyncSerialize and write the byte array provided in the constructor to an HTTP content stream as an asynchronous operation. (Inherited from ByteArrayContent.)
Public methodToString (Inherited from Object.)
Protected methodTryComputeLengthDetermines whether a byte array has a valid length in bytes. (Inherited from ByteArrayContent.)
Top
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.