DownstreamApiOptions.Serializer Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Optional serializer. Will serialize the input to the web API (if any). By default, when not provided:
- If the input derives from
HttpInput
, it's used as is - If the input is a string it's used as is an considered a media type json.
- Otherwise, the object is serialized in JSON, with a UTF8 encoding, and a media
type of application/json:
new StringContent(JsonSerializer.Serialize(input), Encoding.UTF8, "application/json")
public Func<object?,System.Net.Http.HttpContent?>? Serializer { get; set; }
member this.Serializer : Func<obj, System.Net.Http.HttpContent> with get, set
Public Property Serializer As Func(Of Object, HttpContent)
Property Value
Remarks
This property cannot be set in the configuration. It's code only.