• 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

Interface IHttpContentConverter

This interface is used for all

Namespace: Dapplo.HttpExtensions
Assembly: Dapplo.HttpExtensions.dll
Syntax
public interface IHttpContentConverter

Properties

| Improve this Doc View Source

Order

Specify the order in that this IHttpContentConverter is used

Declaration
int Order { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

AddAcceptHeadersForType(Type, HttpRequestMessage)

This will add accept headers depending on the result type

Declaration
void AddAcceptHeadersForType(Type resultType, HttpRequestMessage httpRequestMessage)
Parameters
Type Name Description
Type resultType

Type to read into

HttpRequestMessage httpRequestMessage

HttpClient for the response headers

| Improve this Doc View Source

CanConvertFromHttpContent(Type, HttpContent)

Check if this IHttpContentProcessor can convert the HttpContent into the specified type

Declaration
bool CanConvertFromHttpContent(Type typeToConvertTo, HttpContent httpContent)
Parameters
Type Name Description
Type typeToConvertTo

Type from which a conversion should be made

HttpContent httpContent

HttpContent object to process

Returns
Type Description
System.Boolean

true if this processor can do the conversion

| Improve this Doc View Source

CanConvertToHttpContent(Type, Object)

Check if this IHttpContentProcessor can convert the specified type to a HttpContent

Declaration
bool CanConvertToHttpContent(Type typeToConvertFrom, object content)
Parameters
Type Name Description
Type typeToConvertFrom

Type to convert

System.Object content

Content to place into a HttpContent

Returns
Type Description
System.Boolean

true if this processor can do the conversion

| Improve this Doc View Source

ConvertFromHttpContentAsync(Type, HttpContent, CancellationToken)

Create the target object from the supplied HttpContent

Declaration
Task<object> ConvertFromHttpContentAsync(Type resultType, HttpContent httpContent, CancellationToken cancellationToken = null)
Parameters
Type Name Description
Type resultType

Typ to process the HttpContent to

HttpContent httpContent

HttpContent

CancellationToken cancellationToken

CancellationToken

Returns
Type Description
Task<System.Object>

object of type resultType

| Improve this Doc View Source

ConvertToHttpContent(Type, Object)

Create HttpContent for the supplied object/type

Declaration
HttpContent ConvertToHttpContent(Type typeToConvert, object content)
Parameters
Type Name Description
Type typeToConvert

Type of the content to convert

System.Object content

Content to place into a HttpContent

Returns
Type Description
HttpContent

HttpContent

  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © Dapplo