System.Net.Http.Formatting Extension methods that aid in making formatted requests using . Sends a POST request as an asynchronous operation, with a specified value serialized as JSON. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The type of object to serialize. Sends a POST request as an asynchronous operation, with a specified value serialized as JSON. Includes a cancellation token to cancel the request. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. A cancellation token that can be used by other objects or threads to receive notice of cancellation. The type of object to serialize. Sends a POST request as an asynchronous operation, with a specified value serialized as XML. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The type of object to serialize. Sends a POST request as an asynchronous operation, with a specified value serialized as XML. Includes a cancellation token to cancel the request. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. A cancellation token that can be used by other objects or threads to receive notice of cancellation. The type of object to serialize. Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The formatter used to serialize the value. The type of object to serialize. Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter and media type. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The formatter used to serialize the value. The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. A cancellation token that can be used by other objects or threads to receive notice of cancellation. The type of object to serialize. Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter and media type string. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The formatter used to serialize the value. The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. The type of object to serialize. Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter and media type string. Includes a cancellation token to cancel the request. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The formatter used to serialize the value. The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. A cancellation token that can be used by other objects or threads to receive notice of cancellation. The type of object to serialize. Sends a POST request as an asynchronous operation, with a specified value serialized using the given formatter. Includes a cancellation token to cancel the request. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The formatter used to serialize the value. A cancellation token that can be used by other objects or threads to receive notice of cancellation. The type of object to serialize. Sends a PUT request as an asynchronous operation, with a specified value serialized as JSON. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The type of object to serialize. Sends a PUT request as an asynchronous operation, with a specified value serialized as JSON. Includes a cancellation token to cancel the request. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. A cancellation token that can be used by other objects or threads to receive notice of cancellation. The type of object to serialize. Sends a PUT request as an asynchronous operation, with a specified value serialized as XML. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The type of object to serialize. Sends a PUT request as an asynchronous operation, with a specified value serialized as XML. Includes a cancellation token to cancel the request. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. A cancellation token that can be used by other objects or threads to receive notice of cancellation. The type of object to serialize. Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The formatter used to serialize the value. The type of object to serialize. Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter and media type. Includes a cancellation token to cancel the request. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The formatter used to serialize the value. The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. A cancellation token that can be used by other objects or threads to receive notice of cancellation. The type of object to serialize. Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter and media type string. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The formatter used to serialize the value. The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. The type of object to serialize. Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter and media type string. Includes a cancellation token to cancel the request. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The formatter used to serialize the value. The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. A cancellation token that can be used by other objects or threads to receive notice of cancellation. The type of object to serialize. Sends a PUT request as an asynchronous operation, with a specified value serialized using the given formatter and medai type string. Includes a cancellation token to cancel the request. A task object representing the asynchronous operation. The client used to make the request. The URI the request is sent to. The value to write into the entity body of the request. The formatter used to serialize the value. A cancellation token that can be used by other objects or threads to receive notice of cancellation. The type of object to serialize. Represents the factory for creating new instance of . Creates a new instance of the . A new instance of the . The list of HTTP handler that delegates the processing of HTTP response messages to another handler. Creates a new instance of the . A new instance of the . The inner handler which is responsible for processing the HTTP response messages. The list of HTTP handler that delegates the processing of HTTP response messages to another handler. Creates a new instance of the which should be pipelined. A new instance of the which should be pipelined. The inner handler which is responsible for processing the HTTP response messages. The list of HTTP handler that delegates the processing of HTTP response messages to another handler. Specifies extension methods to allow strongly typed objects to be read from HttpContent instances. Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. An object instance of the specified type. The HttpContent instance from which to read. The type of the object to read. Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. An object instance of the specified type. The HttpContent instance from which to read. The collection of MediaTyepFormatter instances to use. The type of the object to read. Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. An object instance of the specified type. The HttpContent instance from which to read. The collection of MediaTypeFormatter instances to use. The IFormatterLogger to log events to. The type of the object to read. Returns a Task that will yield an object of the specified type from the content instance. A Task that will yield an object instance of the specified type. The HttpContent instance from which to read. The type of the object to read. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. An object instance of the specified type. The HttpContent instance from which to read. The type of the object to read. The collection of MediaTypeFormatter instances to use. Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. An object instance of the specified type. The HttpContent instance from which to read. The type of the object to read. The collection of MediaTypeFormatter instances to use. The IFormatterLogger to log events to. Extension methods to read HTML form URL-encoded datafrom instances. Determines whether the specified content is HTML form URL-encoded data. true if the specified content is HTML form URL-encoded data; otherwise, false. The content. Asynchronously reads HTML form URL-encoded from an instance and stores the results in a object. A task object representing the asynchronous operation. The content. Provides extension methods to read and entities from instances. Determines whether the specified content is HTTP request message content. true if the specified content is HTTP message content; otherwise, false. The content to check. Determines whether the specified content is HTTP response message content. true if the specified content is HTTP message content; otherwise, false. The content to check. Reads the as an . The parsed instance. The content to read. Reads the as an . The parsed instance. The content to read. The URI scheme to use for the request URI. Reads the as an . The parsed instance. The content to read. The URI scheme to use for the request URI. The size of the buffer. Reads the as an . The parsed instance. The content to read. The URI scheme to use for the request URI. The size of the buffer. The maximum length of the HTTP header. Reads the as an . The parsed instance. The content to read. Reads the as an . The parsed instance. The content to read. The size of the buffer. Reads the as an . The parsed instance. The content to read. The size of the buffer. The maximum length of the HTTP header. Extension methods to read MIME multipart entities from instances. Determines whether the specified content is MIME multipart content. true if the specified content is MIME multipart content; otherwise, false. The content. Determines whether the specified content is MIME multipart content with the specified subtype. true if the specified content is MIME multipart content with the specified subtype; otherwise, false. The content. The MIME multipart subtype to match. Reads all body parts within a MIME multipart message and produces a set of instances as a result. A <see cref="T:System.Threading.Tasks.Task`1" /> representing the tasks of getting the collection of instances where each instance represents a body part. An existing instance to use for the object's content. Reads all body parts within a MIME multipart message and produces a set of instances as a result using the streamProvider instance to determine where the contents of each body part is written. A representing the tasks of getting the collection of instances where each instance represents a body part. An existing instance to use for the object's content. A stream provider providing output streams for where to write body parts as they are parsed. The type of the MIME multipart. Reads all body parts within a MIME multipart message and produces a set of instances as a result using the streamProvider instance to determine where the contents of each body part is written and bufferSize as read buffer size. A representing the tasks of getting the collection of instances where each instance represents a body part. An existing instance to use for the object's content. A stream provider providing output streams for where to write body parts as they are parsed. Size of the buffer used to read the contents. The type of the MIME multipart. Derived class which can encapsulate an or an as an entity with media type "application/http". Initializes a new instance of the class encapsulating an . The instance to encapsulate. Initializes a new instance of the class encapsulating an . The instance to encapsulate. Releases unmanaged and - optionally - managed resources true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets the HTTP request message. Gets the HTTP response message. Asynchronously serializes the object's content to the given stream. A instance that is asynchronously serializing the object's content. The to which to write. The associated . Computes the length of the stream if possible. true if the length has been computed; otherwise false. The computed length of the stream. Provides extension methods for the class. Gets any cookie headers present in the request. A collection of instances. The request headers. Gets any cookie headers present in the request that contain a cookie state whose name that matches the specified value. A collection of instances. The request headers. The cookie state name to match. Provides extension methods for the class. Adds cookies to a response. Each Set-Cookie header is represented as one instance. A contains information about the domain, path, and other cookie information as well as one or more instances. Each instance contains a cookie name and whatever cookie state is associate with that name. The state is in the form of a which on the wire is encoded as HTML Form URL-encoded data. This representation allows for multiple related "cookies" to be carried within the same Cookie header while still providing separation between each cookie state. A sample Cookie header is shown below. In this example, there are two with names state1 and state2 respectively. Further, each cookie state contains two name/value pairs (name1/value1 and name2/value2) and (name3/value3 and name4/value4). <code> Set-Cookie: state1:name1=value1&amp;name2=value2; state2:name3=value3&amp;name4=value4; domain=domain1; path=path1; </code> The response headers The cookie values to add to the response. Represents a multipart file data. Initializes a new instance of the class. The headers of the multipart file data. The name of the local file for the multipart file data. Gets or sets the headers of the multipart file data. The headers of the multipart file data. Gets or sets the name of the local file for the multipart file data. The name of the local file for the multipart file data. Represents an suited for writing each MIME body parts of the MIME multipart message to a file using a . Initializes a new instance of the class. The root path where the content of MIME multipart body parts are written to. Initializes a new instance of the class. The root path where the content of MIME multipart body parts are written to. The number of bytes buffered for writes to the file. Gets or sets the number of bytes buffered for writes to the file. The number of bytes buffered for writes to the file. Gets or sets the multipart file data. The multipart file data. Gets the name of the local file which will be combined with the root path to create an absolute file name where the contents of the current MIME body part will be stored. A relative filename with no path component. The headers for the current MIME body part. Gets the stream instance where the message body part is written to. The instance where the message body part is written to. The content of HTTP. The header fields describing the body part. Gets or sets the root path where the content of MIME multipart body parts are written to. The root path where the content of MIME multipart body parts are written to. An suited for use with HTML file uploads for writing file content to a . The stream provider looks at the <b>Content-Disposition</b> header field and determines an output based on the presence of a <b>filename</b> parameter. If a <b>filename</b> parameter is present in the <b>Content-Disposition</b> header field then the body part is written to a , otherwise it is written to a . This makes it convenient to process MIME Multipart HTML Form data which is a combination of form data and file content. Initializes a new instance of the class. The root path where the content of MIME multipart body parts are written to. Initializes a new instance of the class. The root path where the content of MIME multipart body parts are written to. The number of bytes buffered for writes to the file. Reads the non-file contents as form data A task that represents the asynchronous operation. Gets a of form data passed as part of the multipart form data. The of form data. The instance where the message body part is written. The HTTP content that contains this body part. Header fields describing the body part. Represents a multipart memory stream provider. Initializes a new instance of the class. Returns the for the . The for the . A object. The HTTP content headers. Represents the provider for the multipart related multistream. Initializes a new instance of the class. Gets the related stream for the provider. The content headers. The parent content. The http content headers. Gets the root content of the . The root content of the . Represents a stream provider that examines the headers provided by the MIME multipart parser as part of the MIME multipart extension methods (see ) and decides what kind of stream to return for the body part to be written to. Initializes a new instance of the class. Gets or sets the contents for this . The contents for this . Executes the post processing operation for this . The asynchronous task for this operation. Gets the stream where to write the body part to. This method is called when a MIME multipart body part has been parsed. The instance where the message body part is written to. The content of the HTTP. The header fields describing the body part. Contains a value as well as an associated that will be used to serialize the value when writing this content. Initializes a new instance of the class. The type of object this instance will contain. The value of the object this instance will contain. The formatter to use when serializing the value. Initializes a new instance of the class. The type of object this instance will contain. The value of the object this instance will contain. The formatter to use when serializing the value. The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. Initializes a new instance of the class. The type of object this instance will contain. The value of the object this instance will contain. The formatter to use when serializing the value. The authoritative value of the Content-Type header. Gets the media-type formatter associated with this content instance. The . Gets the type of object managed by this instance. The object type. Asynchronously serializes the object's content to the given stream. The task object representing the asynchronous operation. The stream to write to. The associated . Computes the length of the stream if possible. true if the length has been computed; otherwise, false. Receives the computed length of the stream. Gets or sets the value of the content. The content value. Generic form of . The type of object this class will contain. Initializes a new instance of the class. The value of the object this instance will contain. The formatter to use when serializing the value. Initializes a new instance of the <see cref="T:System.Net.Http.ObjectContent`1" /> class. The value of the object this instance will contain. The formatter to use when serializing the value. The authoritative value of the Content-Type header. Can be null, in which case the default content type of the formatter will be used. Initializes a new instance of the class. The value of the object this instance will contain. The formatter to use when serializing the value. The authoritative value of the Content-Type header. Enables scenarios where a data producer wants to write directly (either synchronously or asynchronously) using a stream. Initializes a new instance of the class. An action that is called when an output stream is available, allowing the action to write to it directly. Initializes a new instance of the class. An action that is called when an output stream is available, allowing the action to write to it directly. The media type. Initializes a new instance of the class. An action that is called when an output stream is available, allowing the action to write to it directly. The media type. Asynchronously serializes the push content into stream. The serialized push content. The stream where the push content will be serialized. The context. Determines whether the stream content has a valid length in bytes. true if length is a valid length; otherwise, false. The length in bytes of the stream content. Contains extension methods to allow strongly typed objects to be read from the query component of instances. Parses the query portion of the specified URI. A that contains the query parameters. The URI to parse. Reads HTML form URL encoded data provided in the URI query string as an object of a specified type. true if the query component of the URI can be read as the specified type; otherwise, false. The URI to read. The type of object to read. When this method returns, contains an object that is initialized from the query component of the URI. This parameter is treated as uninitialized. Reads HTML form URL encoded data provided in the URI query string as an object of a specified type. true if the query component of the URI can be read as the specified type; otherwise, false. The URI to read. When this method returns, contains an object that is initialized from the query component of the URI. This parameter is treated as uninitialized. The type of object to read. Reads HTML form URL encoded data provided in the query component as a object. true if the query component can be read as ; otherwise false. The instance from which to read. An object to be initialized with this instance or null if the conversion cannot be performed. Represents a helper class to allow a synchronous formatter on top of the asynchronous formatter infrastructure. Initializes a new instance of the class. Gets or sets the suggested size of buffer to use with streams in bytes. The suggested size of buffer to use with streams in bytes. Reads synchronously from the buffered stream. An object of the given . The type of the object to deserialize. The stream from which to read The , if available. Can be null. The to log events to. Reads asynchronously from the buffered stream. A task object representing the asynchronous operation. The type of the object to deserialize. The stream from which to read. The , if available. Can be null. The to log events to. Writes synchronously to the buffered stream. The type of the object to serialize. The object value to write. Can be null. The stream to which to write. The , if available. Can be null. Writes asynchronously to the buffered stream. A task object representing the asynchronous operation. The type of the object to serialize. The object value to write. It may be null. The stream to which to write. The , if available. Can be null. The transport context. Represents the result of content negotiation performed using <see cref="M:System.Net.Http.Formatting.IContentNegotiator.Negotiate(System.Type,System.Net.Http.HttpRequestMessage,System.Collections.Generic.IEnumerable{System.Net.Http.Formatting.MediaTypeFormatter})" /> Create the content negotiation result object. The formatter. The preferred media type. Can be null. The formatter chosen for serialization. The media type that is associated with the formatter chosen for serialization. Can be null. The default implementation of , which is used to select a for an or . Initializes a new instance of the class. Initializes a new instance of the class. true to exclude formatters that match only on the object type; otherwise, false. Determines how well each formatter matches an HTTP request. Returns a collection of objects that represent all of the matches. The type to be serialized. The request. The set of objects from which to choose. If true, exclude formatters that match only on the object type; otherwise, false. Returns a . Matches a set of Accept header fields against the media types that a formatter supports. Returns a object that indicates the quality of the match, or null if there is no match. A list of Accept header values, sorted in descending order of q factor. You can create this list by calling the method. The formatter to match against. Matches a request against the objects in a media-type formatter. Returns a object that indicates the quality of the match, or null if there is no match. The requrst. The media-type formatter. Match the content type of a request against the media types that a formatter supports. Returns a object that indicates the quality of the match, or null if there is no match. The request. The formatter to match against. Selects the first supported media type of a formatter. Returns a with set to , or null if there is no match. The type to match. The formatter to match against. Performs content negotiating by selecting the most appropriate out of the passed in for the given that can serialize an object of the given . The result of the negotiation containing the most appropriate instance, or null if there is no appropriate formatter. The type to be serialized. The request. The set of objects from which to choose. Determines the best character encoding for writing the response. Returns the that is the best match. The request. The selected media formatter. Selects the best match among the candidate matches found. Returns the object that represents the best match. The collection of matches. Sorts Accept header values in descending order of q factor. Returns the sorted list of MediaTypeWithQualityHeaderValue objects. A collection of MediaTypeWithQualityHeaderValue objects, representing the Accept header values. Sorts a list of Accept-Charset, Accept-Encoding, Accept-Language or related header values in descending order or q factor. Returns the sorted list of StringWithQualityHeaderValue objects. A collection of StringWithQualityHeaderValue objects, representing the header fields. Evaluates whether a match is better than the current match. Returns whichever object is a better match. The current match. The match to evaluate against the current match. Helper class to serialize <see cref="T:System.Collections.Generic.IEnumerable`1" /> types by delegating them through a concrete implementation."/&gt;. The interface implementing to proxy. Initialize a DelegatingEnumerable. This constructor is necessary for to work. Initialize a DelegatingEnumerable with an <see cref="T:System.Collections.Generic.IEnumerable`1" />. This is a helper class to proxy <see cref="T:System.Collections.Generic.IEnumerable`1" /> interfaces for . The <see cref="T:System.Collections.Generic.IEnumerable`1" /> instance to get the enumerator from. This method is not implemented but is required method for serialization to work. Do not use. The item to add. Unused. Get the enumerator of the associated <see cref="T:System.Collections.Generic.IEnumerable`1" />. The enumerator of the <see cref="T:System.Collections.Generic.IEnumerable`1" /> source. Get the enumerator of the associated <see cref="T:System.Collections.Generic.IEnumerable`1" />. The enumerator of the <see cref="T:System.Collections.Generic.IEnumerable`1" /> source. Represent the collection of form data. Initializes a new instance of class. The pairs. Initializes a new instance of class. The query. Initializes a new instance of class. The URI Gets the collection of form data. The collection of form data. The key. Gets an enumerable that iterates through the collection. The enumerable that iterates through the collection. Gets the values of the collection of form data. The values of the collection of form data. The key. Reads the collection of form data as a collection of name value. The collection of form data as a collection of name value. Gets an enumerable that iterates through the collection. The enumerable that iterates through the collection. class for handling HTML form URL-ended data, also known as application/x-www-form-urlencoded. Initializes a new instance of the class. Queries whether the can deserializean object of the specified type. true if the can deserialize the type; otherwise, false. The type to deserialize. Queries whether the can serializean object of the specified type. true if the can serialize the type; otherwise, false. The type to serialize. Gets the default media type for HTML form-URL-encoded data, which is application/x-www-form-urlencoded. The default media type for HTML form-URL-encoded data Gets or sets the maximum depth allowed by this formatter. The maximum depth. Gets or sets the size of the buffer when reading the incoming stream. The buffer size. Asynchronously deserializes an object of the specified type. A whose result will be the object instance that has been read. The type of object to deserialize. The to read. The for the content being read. The to log events to. Performs content negotiation. This is the process of selecting a response writer (formatter) in compliance with header values in the request. Performs content negotiating by selecting the most appropriate out of the passed in formatters for the given request that can serialize an object of the given type. The result of the negotiation containing the most appropriate instance, or null if there is no appropriate formatter. The type to be serialized. Request message, which contains the header values used to perform negotiation. The set of objects from which to choose. Specifies a callback interface that a formatter can use to log errors while reading. Logs an error. The path to the member for which the error is being logged. The error message. Logs an error. The path to the member for which the error is being logged. The error message to be logged. Defines method that determines whether a given member is required on deserialization. Determines whether a given member is required on deserialization. true if should be treated as a required member; otherwise false. The to be deserialized. Represents the class to handle JSON. Initializes a new instance of the class. Determines whether this can read objects of the specified . true if objects of this can be read, otherwise false. The type of object that will be read. Determines whether this can write objects of the specified . true if objects of this can be written, otherwise false. The type of object that will be written. Creates a JsonSerializerSettings instance with the default settings used by the . A newly created JsonSerializerSettings instance with the default settings used by the . Gets the default media type for JSON, namely "application/json". The for JSON. Gets or sets a value indicating whether to indent elements when writing data. true if to indent elements when writing data; otherwise, false. Gets or sets the maximum depth allowed by this formatter. The maximum depth allowed by this formatter. Reads an object of the specified from the specified . This method is called during deserialization. Returns . The type of object to read. Thestream from which to read The content being written. The to log events to. Gets or sets the JsonSerializerSettings used to configure the JsonSerializer. The JsonSerializerSettings used to configure the JsonSerializer. Gets or sets a value indicating whether to use by default. true if to by default; otherwise, false. Writes an object of the specified to the specified . This method is called during serialization. A that will write the value to the stream. The type of object to write. The object to write. The to which to write. The where the content is being written. The . Base class to handle serializing and deserializing strongly-typed objects using . Initializes a new instance of the class. Queries whether this can deserializean object of the specified type. true if the can deserialize the type; otherwise, false. The type to deserialize. Queries whether this can serializean object of the specified type. true if the can serialize the type; otherwise, false. The type to serialize. Gets the default value for the specified type. The default value. The type for which to get the default value. Returns a specialized instance of the that can format a response for the given parameters. Returns . The type to format. The request. The media type. Gets or sets the maximum number of keys stored in a T: . The maximum number of keys. Gets the mutable collection of objects that match HTTP requests to media types. The collection. Asynchronously deserializes an object of the specified type. A whose result will be an object of the given type. The type of the object to deserialize. The to read. The , if available. It may be null. The to log events to. Derived types need to support reading. Gets or sets the instance used to determine required members. The instance. Determines the best character encoding for reading or writing an HTTP entity body, given a set of content headers. The encoding that is the best match. The content headers. Sets the default headers for content that will be formatted using this formatter. This method is called from the constructor. This implementation sets the Content-Type header to the value of mediaType if it is not null. If it is null it sets the Content-Type to the default media type of this formatter. If the Content-Type does not specify a charset it will set it using this formatters configured . The type of the object being serialized. See . The content headers that should be configured. The authoritative media type. Can be null. Gets the mutable collection of character encodings supported bythis . The collection of objects. Gets the mutable collection of media types supported bythis . The collection of objects. Asynchronously writes an object of the specified type. A that will perform the write. The type of the object to write. The object value to write. It may be null. The to which to write. The if available. It may be null. The if available. It may be null. Derived types need to support writing. Represents a collection class that contains instances. Initializes a new instance of the class with default values. Initializes a new instance of the class with the given . A collection of instances to place in the collection. Searches a collection for a formatter that can read the .NET in the given . The that can read the type, or null if no formatter found. The .NET type to read. The media type to match on. Searches a collection for a formatter that can write the .NET in the given . The that can write the type, or null if no formatter found. The .NET type to write. The media type to match on. Gets the to use for application/x-www-form-urlencoded data. The to use for application/x-www-form-urlencoded data. Determines whether the is one of those loosely defined types that should be excluded from validation. true if the type should be excluded; otherwise, false. The .NET to validate. Gets the to use for JSON. The to use for JSON. Gets the to use for XML. The to use for XML. Updates the given set of formatter of elements so that it associates the mediaType with s containing a specific query parameter and value. The to receive the new item. The name of the query parameter. The value assigned to that query parameter. The to associate with a containing a query string matching queryStringParameterName and queryStringParameterValue. Updates the given set of formatter of elements so that it associates the mediaType with s containing a specific query parameter and value. The to receive the new item. The name of the query parameter. The value assigned to that query parameter. The media type to associate with a containing a query string matching queryStringParameterName and queryStringParameterValue. Updates the given set of formatter of elements so that it associates the mediaType with a specific HTTP request header field with a specific value. The to receive the new item. Name of the header to match. The header value to match. The to use when matching headerValue. if set to true then headerValue is considered a match if it matches a substring of the actual header value. The to associate with a entry with a name matching headerName and a value matching headerValue. Updates the given set of formatter of elements so that it associates the mediaType with a specific HTTP request header field with a specific value. The to receive the new item. Name of the header to match. The header value to match. The to use when matching headerValue. if set to true then headerValue is considered a match if it matches a substring of the actual header value. The media type to associate with a entry with a name matching headerName and a value matching headerValue. This class describes how well a particular matches a request. Initializes a new instance of the class. The matching formatter. The media type. Can be null in which case the media type application/octet-stream is used. The quality of the match. Can be null in which case it is considered a full match with a value of 1.0 The kind of match. Gets the media type formatter. Gets the matched media type. Gets the quality of the match Gets the kind of match that occurred. Contains information about the degree to which a matches the explicit or implicit preferences found in an incoming request. No match was found Matched on a type, meaning that the formatter is able to serialize the type. Matched on an explicit literal accept header, such as “application/json”. Matched on an explicit subtype range in an Accept header, such as “application/*”. Matched on an explicit “*/*” range in the Accept header. Matched on after having applied the various s. Matched on the media type of the entity body in the HTTP request message. An abstract base class used to create an association between or instances that have certain characteristics and a specific . Initializes a new instance of a with the given mediaType value. The that is associated with or instances that have the given characteristics of the . Initializes a new instance of a with the given mediaType value. The that is associated with or instances that have the given characteristics of the . Gets the that is associated with or instances that have the given characteristics of the . Returns the quality of the match of the associated with request. The quality of the match. It must be between 0.0 and 1.0. A value of 0.0 signifies no match. A value of 1.0 signifies a complete match. The to evaluate for the characteristics associated with the of the . Class that provides s from query strings. Initializes a new instance of the class. The name of the query string parameter to match, if present. The value of the query string parameter specified by queryStringParameterName. The to use if the query parameter specified by queryStringParameterName is present and assigned the value specified by queryStringParameterValue. Initializes a new instance of the class. The name of the query string parameter to match, if present. The value of the query string parameter specified by queryStringParameterName. The media type to use if the query parameter specified by queryStringParameterName is present and assigned the value specified by queryStringParameterValue. Gets the query string parameter name. Gets the query string parameter value. Returns a value indicating whether the current instance can return a from request. If this instance can produce a from request it returns 1.0 otherwise 0.0. The to check. This class provides a mapping from an arbitrary HTTP request header field to a used to select instances for handling the entity body of an or . <remarks>This class only checks header fields associated with for a match. It does not check header fields associated with or instances.</remarks> Initializes a new instance of the class. Name of the header to match. The header value to match. The to use when matching headerValue. if set to true then headerValue is considered a match if it matches a substring of the actual header value. The to use if headerName and headerValue is considered a match. Initializes a new instance of the class. Name of the header to match. The header value to match. The value comparison to use when matching headerValue. if set to true then headerValue is considered a match if it matches a substring of the actual header value. The media type to use if headerName and headerValue is considered a match. Gets the name of the header to match. Gets the header value to match. Gets the to use when matching . Gets a value indicating whether is a matched as a substring of the actual header value. this instance is value substring. truefalse Returns a value indicating whether the current instance can return a from request. The quality of the match. It must be between 0.0 and 1.0. A value of 0.0 signifies no match. A value of 1.0 signifies a complete match. The to check. A that maps the X-Requested-With http header field set by AJAX XmlHttpRequest (XHR) to the media type application/json if no explicit Accept header fields are present in the request. Initializes a new instance of class Returns a value indicating whether the current instance can return a from request. The quality of the match. A value of 0.0 signifies no match. A value of 1.0 signifies a complete match and that the request was made using XmlHttpRequest without an Accept header. The to check. class to handle Xml. Initializes a new instance of the class. Queries whether the can deserializean object of the specified type. true if the can deserialize the type; otherwise, false. The type to deserialize. Queries whether the can serializean object of the specified type. true if the can serialize the type; otherwise, false. The type to serialize. Gets the default media type for the XML formatter. The default media type, which is “application/xml”. Gets or sets a value indicating whether to indent elements when writing data. true to indent elements; otherwise, false. Gets and sets the maximum nested node depth. The maximum nested node depth. Called during deserialization to read an object of the specified type from the specified readStream. A whose result will be the object instance that has been read. The type of object to read. The from which to read. The for the content being read. The to log events to. Unregisters the serializer currently associated with the given type. true if a serializer was previously registered for the type; otherwise, false. The type of object whose serializer should be removed. Registers an to read or write objects of a specified type. The instance. The type of object that will be serialized or deserialized with. Registers an to read or write objects of a specified type. The type of object that will be serialized or deserialized with. The instance. Registers an to read or write objects of a specified type. The type of object that will be serialized or deserialized with. The instance. Registers an to read or write objects of a specified type. The instance. The type of object that will be serialized or deserialized with. Gets or sets a value indicating whether the XML formatter uses the as the default serializer, instead of using the . If true, the formatter uses the by default; otherwise, it uses the by default. Called during serialization to write an object of the specified type to the specified writeStream. A that will write the value to the stream. The type of object to write. The object to write. The to which to write. The for the content being written. The . Represents the event arguments for the HTTP progress. Initializes a new instance of the class. The percentage of the progress. The user token. The number of bytes transferred. The total number of bytes transferred. Gets the number of bytes transferred in the HTTP progress. The number of bytes transferred in the HTTP progress. Gets the total number of bytes transferred by the HTTP progress. The total number of bytes transferred by the HTTP progress. Generates progress notification for both request entities being uploaded and response entities being downloaded. Initializes a new instance of the class. Initializes a new instance of the class. The inner message handler. Occurs when event entities are being downloaded. Occurs when event entities are being uploaded. Raises the event that handles the request of the progress. The request. The event handler for the request. Raises the event that handles the response of the progress. The request. The event handler for the request. Sends the specified progress message to an HTTP server for delivery. The sent progress message. The request. The cancellation token. Provides value for the cookie header. Initializes a new instance of the class. Initializes a new instance of the class. The value of the name. The values. Initializes a new instance of the class. The value of the name. The value. Creates a shallow copy of the cookie value. A shallow copy of the cookie value. Gets a collection of cookies sent by the client. A collection object representing the client’s cookie variables. Gets or sets the domain to associate the cookie with. The name of the domain to associate the cookie with. Gets or sets the expiration date and time for the cookie. The time of day (on the client) at which the cookie expires. Gets or sets a value that specifies whether a cookie is accessible by client-side script. true if the cookie has the HttpOnly attribute and cannot be accessed through a client-side script; otherwise, false. Gets a shortcut to the cookie property. The cookie value. Gets or sets the maximum age permitted for a resource. The maximum age permitted for a resource. Gets or sets the virtual path to transmit with the current cookie. The virtual path to transmit with the cookie. Gets or sets a value indicating whether to transmit the cookie using Secure Sockets Layer (SSL)—that is, over HTTPS only. true to transmit the cookie over an SSL connection (HTTPS); otherwise, false. Returns a string that represents the current object. A string that represents the current object. Indicates a value whether the string representation will be converted. true if the string representation will be converted; otherwise, false. The input value. The parsed value to convert. Contains cookie name and its associated cookie state. Initializes a new instance of the class. The name of the cookie. Initializes a new instance of the class. The name of the cookie. The collection of name-value pair for the cookie. Initializes a new instance of the class. The name of the cookie. The value of the cookie. Returns a new object that is a copy of the current instance. A new object that is a copy of the current instance. Gets or sets the cookie value with the specified cookie name, if the cookie data is structured. The cookie value with the specified cookie name. Gets or sets the name of the cookie. The name of the cookie. Returns the string representation the current object. The string representation the current object. Gets or sets the cookie value, if cookie data is a simple string value. The value of the cookie. Gets or sets the collection of name-value pair, if the cookie data is structured. The collection of name-value pair for the cookie.