Click or drag to resize

XmlHttpRequestProcessor Class

A concrete implementation of the IRequestProcessor interface that turns Request objects into XML, adds the necessary security details, sends them over HTTP to the Degree Days.net API servers, and parses the XML responses into Response object models.
Inheritance Hierarchy
SystemObject
  DegreeDays.Api.ProcessingXmlHttpRequestProcessor

Namespace: DegreeDays.Api.Processing
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public sealed class XmlHttpRequestProcessor : IRequestProcessor

The XmlHttpRequestProcessor type exposes the following members.

Methods
 NameDescription
Public methodProcess Processes the Request object and returns a Response object which is either a FailureResponse or a Response that's type is the counterpart to that of the Request object passed in. For example, successful processing of a LocationDataRequest will result in a LocationDataResponse.
Top
Remarks

To create an instance of this class, you'll need to use the XmlHttpRequestProcessorBuilder class. Using a Builder you can heavily customize the way in which the created XmlHttpRequestProcessor works. For example, a default XmlHttpRequestProcessor uses System.Net classes to manage connections to the API servers, but you might want to swap in alternative functionality if you want more control, or if your application needs to run in an environment that doesn't support HttpWebRequest et al.

For more on the customization options, see the docs for the XmlHttpRequestProcessorBuilder.

Thread Safety
This class is designed to be safe for use in a multi-threaded environment. However, if you create a customized instance of this class, then the thread-safety of its operation will depend on the thread-safety of any custom processing components that you introduce.
See Also