• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Dapplo.HttpExtensions
    • AuthorizationExtensions
    • HttpBehaviour
    • HttpBehaviourExtensions
    • HttpClientExtensions
    • HttpContentExtensions
    • HttpExtensionsGlobals
    • HttpRequestMessageConfiguration
    • HttpRequestMessageExtensions
    • HttpResponse
    • HttpResponse<TResponse, TErrorResponse>
    • HttpResponse<TResponse>
    • HttpResponseMessageExtensions
    • HttpResponseWithError<TErrorResponse>
    • IChangeableHttpBehaviour
    • IHttpBehaviour
    • IHttpContentConverter
    • IHttpRequestConfiguration
    • IHttpSettings
    • IJsonSerializer
    • MiscExtensions
    • UriActionExtensions
    • UriModifyExtensions
    • UriParseExtensions
  • Dapplo.HttpExtensions.ContentConverter
    • ByteArrayHttpContentConverter
    • DefaultJsonHttpContentConverter
    • DefaultJsonHttpContentConverterConfiguration
    • FormUriEncodedContentConverter
    • StreamHttpContentConverter
    • StringConfiguration
    • StringHttpContentConverter
    • SyndicationFeedHttpContentConverter
    • XDocumentHttpContentConverter
  • Dapplo.HttpExtensions.Extensions
    • EnumExtensions
    • HttpBehaviourExtensions
    • StringExtensions
    • TypeExtensions
  • Dapplo.HttpExtensions.Factory
    • HttpClientFactory
    • HttpContentFactory
    • HttpMessageHandlerFactory
    • HttpRequestMessageFactory
    • WebProxyFactory
  • Dapplo.HttpExtensions.JsonNet
    • JsonNetJsonSerializer
    • ReadOnlyConsideringContractResolver
  • Dapplo.HttpExtensions.JsonSimple
    • DataContractJsonSerializerStrategy
    • DefaultJsonHttpContentConverter
    • IJsonSerializerStrategy
    • JsonExtensionDataAttribute
    • PocoJsonSerializerStrategy
    • SimpleJson
    • SimpleJsonSerializer
  • Dapplo.HttpExtensions.Listener
    • HttpListenerContextExtensions
    • ListenerPortExtensions
    • UriHttpListenerExtensions
  • Dapplo.HttpExtensions.OAuth
    • AuthorizeModes
    • BaseOAuthSettings
    • GrantTypes
    • ICodeReceiverSettings
    • IOAuth1Token
    • IOAuth2Token
    • IOAuthCodeReceiver
    • OAuth1HttpBehaviour
    • OAuth1HttpBehaviourFactory
    • OAuth1HttpMessageHandler
    • OAuth1Parameters
    • OAuth1RequestConfiguration
    • OAuth1Settings
    • OAuth1SignatureTransports
    • OAuth1SignatureTypes
    • OAuth1Token
    • OAuth2HttpBehaviourFactory
    • OAuth2HttpMessageHandler
    • OAuth2Settings
    • OAuth2TokenResponse
    • OAuthExtensions
  • Dapplo.HttpExtensions.OAuth.CodeReceivers
    • EmbeddedBrowserCodeReceiver
  • Dapplo.HttpExtensions.OAuth.Desktop
    • OAuthLoginForm
  • Dapplo.HttpExtensions.Support
    • HttpPartAttribute
    • HttpParts
    • HttpRequestAttribute
    • HttpResponseAttribute
    • HttpSettings
    • MediaTypes
    • ProgressStream
    • ProgressStreamReport
  • Dapplo.HttpExtensions.SystemTextJson
    • SystemTextJsonSerializer
  • Dapplo.HttpExtensions.WinForms.ContentConverter
    • BitmapConfiguration
    • BitmapHttpContentConverter
  • Dapplo.HttpExtensions.Wpf.ContentConverter
    • BitmapSourceConfiguration
    • BitmapSourceHttpContentConverter

Class HttpBehaviour

This is the default implementation of the IHttpBehaviour, see IHttpBehaviour for details Most values are initialized via the HttpExtensionsGlobals

Inheritance
System.Object
HttpBehaviour
Implements
IChangeableHttpBehaviour
IHttpBehaviour
Inherited Members
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: Dapplo.HttpExtensions
Assembly: Dapplo.HttpExtensions.dll
Syntax
public class HttpBehaviour : IChangeableHttpBehaviour, IHttpBehaviour

Properties

| Improve this Doc View Source

CookieContainer

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public CookieContainer CookieContainer { get; set; }
Property Value
Type Description
CookieContainer
| Improve this Doc View Source

Current

Retrieve the current IHttpBehaviour from the CallContext, if there is nothing available, create and make it current This never returns null

Declaration
public static IHttpBehaviour Current { get; }
Property Value
Type Description
IHttpBehaviour
| Improve this Doc View Source

DefaultEncoding

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public Encoding DefaultEncoding { get; set; }
Property Value
Type Description
Encoding
| Improve this Doc View Source

DownloadProgress

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public Action<float> DownloadProgress { get; set; }
Property Value
Type Description
Action<System.Single>
| Improve this Doc View Source

HttpCompletionOption

The ResponseHeadersRead forces a pause between the initial response and reading the content, this is needed for better error handling and progress Turning this to ResponseContentRead might change the behaviour

Declaration
public HttpCompletionOption HttpCompletionOption { get; set; }
Property Value
Type Description
HttpCompletionOption
| Improve this Doc View Source

HttpContentConverters

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public IList<IHttpContentConverter> HttpContentConverters { get; set; }
Property Value
Type Description
IList<IHttpContentConverter>
| Improve this Doc View Source

HttpSettings

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public IHttpSettings HttpSettings { get; set; }
Property Value
Type Description
IHttpSettings
| Improve this Doc View Source

JsonSerializer

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public IJsonSerializer JsonSerializer { get; set; }
Property Value
Type Description
IJsonSerializer
| Improve this Doc View Source

OnHttpClientCreated

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public Action<HttpClient> OnHttpClientCreated { get; set; }
Property Value
Type Description
Action<HttpClient>
| Improve this Doc View Source

OnHttpContentCreated

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public Func<HttpContent, HttpContent> OnHttpContentCreated { get; set; }
Property Value
Type Description
Func<HttpContent, HttpContent>
| Improve this Doc View Source

OnHttpMessageHandlerCreated

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public Func<HttpMessageHandler, HttpMessageHandler> OnHttpMessageHandlerCreated { get; set; }
Property Value
Type Description
Func<HttpMessageHandler, HttpMessageHandler>
| Improve this Doc View Source

OnHttpRequestMessageCreated

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public Func<HttpRequestMessage, HttpRequestMessage> OnHttpRequestMessageCreated { get; set; }
Property Value
Type Description
Func<HttpRequestMessage, HttpRequestMessage>
| Improve this Doc View Source

ReadBufferSize

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public int ReadBufferSize { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

RequestConfigurations

Configuration for different parts of the library, or your own implementations, which can be set on a thread/request base

Declaration
public IDictionary<string, IHttpRequestConfiguration> RequestConfigurations { get; set; }
Property Value
Type Description
IDictionary<System.String, IHttpRequestConfiguration>
| Improve this Doc View Source

ThrowOnError

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public bool ThrowOnError { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

UploadProgress

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public Action<float> UploadProgress { get; set; }
Property Value
Type Description
Action<System.Single>
| Improve this Doc View Source

UseProgressStream

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public bool UseProgressStream { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

ValidateResponseContentType

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

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

Methods

| Improve this Doc View Source

MakeCurrent()

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public void MakeCurrent()
| Improve this Doc View Source

ShallowClone()

The IHttpBehaviour is used to control the behaviour of all operations in the HttpExtensions library.

Declaration
public IChangeableHttpBehaviour ShallowClone()
Returns
Type Description
IChangeableHttpBehaviour

"Shallow" Cloned instance of IChangeableHttpBehaviour

Implements

IChangeableHttpBehaviour
IHttpBehaviour

Extension Methods

HttpBehaviourExtensions.ChainOnHttpContentCreated(IChangeableHttpBehaviour, Func<HttpContent, HttpContent>)
HttpBehaviourExtensions.ChainOnHttpMessageHandlerCreated(IChangeableHttpBehaviour, Func<HttpMessageHandler, HttpMessageHandler>)
HttpBehaviourExtensions.ChainOnHttpRequestMessageCreated(IChangeableHttpBehaviour, Func<HttpRequestMessage, HttpRequestMessage>)
HttpBehaviourExtensions.GetConfig<THttpRequestConfiguration>(IHttpBehaviour)
HttpBehaviourExtensions.SetConfig(IHttpBehaviour, IHttpRequestConfiguration)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © Dapplo