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
responseHttpResponseMessageresponse
contentTresponse content
settingsXmlWriterSettingsoptional settings
modifyWriterFuncFunc<XmlWriter, XmlWriter>optional Func<TResult> that can be used to modify the XmlWriter
mediaTypestringmedia type to use, default is
text/xml
Returns
- HttpResponseMessage
response
Type Parameters
T