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
HttpResponseMessageresponse
content
Tresponse content
settings
XmlWriterSettingsoptional settings
modifyWriterFunc
Func<XmlWriter, XmlWriter>optional Func<TResult> that can be used to modify the XmlWriter
mediaType
stringmedia type to use, default is
text/xml
Returns
- HttpResponseMessage
response
Type Parameters
T