jenius-apps / nightingale-rest-api-client

A modern, resource-efficient REST API client for Windows
https://nightingale.rest
MIT License
769 stars 36 forks source link

Cannot use `text/xml;+utf-8` for `content-type` #227

Open sharpninja opened 2 years ago

sharpninja commented 2 years ago

I'm trying to submit a SOAP request to a WCF service which expects the request to be text/xml;+utf-8. Unfortunately, Nightingale is reporting this stack when I use that value in the content-type header.

The format of value 'text/xml;+utf-8' is invalid.
   at System.Net.Http.Headers.MediaTypeHeaderValue.CheckMediaTypeFormat(String, String) + 0xcf
   at System.Net.Http.StringContent..ctor(String, Encoding, String) + 0x5e
   at Nightingale.Core.Client.Builders.BodyBuilder.<SetBody>d__4.MoveNext() + 0x1cc
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + 0xb
   at Nightingale.Core.Client.NightingaleClient.<ToHttpMessage>d__9.MoveNext() + 0x2c9
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
   at Nightingale.Core.Client.NightingaleClient.<SendAsync>d__7.MoveNext() + 0x153
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
   at Nightingale.Core.Services.RequestSender.<SendRequestAsync>d__5.MoveNext() + 0x156