Closed alwendt4 closed 7 years ago
I figured it out. Simply send requests with the "Accept" header = "application/xml". Please close issue. Sorry for my lack of knowledge.
Hey @alwendt4,
Apologise for the late response, I'm glad you figured it out. I'll take a look at your other issue now.
Cheers,
Jark
Having a really, really hard time returning responses in XML format. Basically, I want to implement your headless demo, with a response in XML NOT JSON.
Spent hours and hours and hour looking at your stuff ... guessed myself into using the RestRouteHandlerTest.Happy.cs as a sample, but when I execute:
... it tells me that the MutableHttpServerRequest doesn't have a constructor.
Basically, my headless demo has a Run() method like this ... public async void Run(IBackgroundTaskInstance taskInstance) { _deferral = taskInstance.GetDeferral(); RestRouteHandler restRouteHandler = new RestRouteHandler(); restRouteHandler.RegisterController();
How the HECK do I set the response content-type?!!!!
I'm using PostMan as my RESTful client. It's receiving my request, and returning the response in JSON format. I'm stumped.
I've been trying to do this for weeks!!!!
No really good samples. Help!!!!