Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use specific Content-Type for oneM2M platform #298

Open
thinksomuch opened this issue Dec 12, 2024 · 0 comments
Open

Can't use specific Content-Type for oneM2M platform #298

thinksomuch opened this issue Dec 12, 2024 · 0 comments

Comments

@thinksomuch
Copy link

thinksomuch commented Dec 12, 2024

Hi,

Can't use specific Content-Type for oneM2M platform such as 'application/vnd.onem2m-res+json;ty=4'.
Failed with following stack trace.

  • Version : 4.5.0.0

  • Request headers

Accept: application/json
X-M2M-RI: 12345
X-M2M-Origin: SOrigin
Content-Type: application/vnd.onem2m-res+json;ty=4
  • Stack trace
The format of value 'application/vnd.onem2m-res+json;ty=4' 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__10.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__8.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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant