Table of Contents

Method WithXmlContent

Namespace
HttpBuildR
Assembly
HttpBuildR.Response.dll

WithXmlContent<T>(HttpResponseMessage, T, XmlWriterSettings?, Func<XmlWriter, XmlWriter>?, string)

Modifies the HttpResponseMessage with XML StringContent

public static HttpResponseMessage WithXmlContent<T>(this HttpResponseMessage response, T content, XmlWriterSettings? settings = null, Func<XmlWriter, XmlWriter>? modifyWriterFunc = null, string mediaType = "text/xml") where T : class

Parameters

response HttpResponseMessage

response

content T

response content

settings XmlWriterSettings

optional settings

modifyWriterFunc Func<XmlWriter, XmlWriter>

optional Func<TResult> that can be used to modify the XmlWriter

mediaType string

media type to use, default is text/xml

Returns

HttpResponseMessage

response

Type Parameters

T