-
Notifications
You must be signed in to change notification settings - Fork 37
Cannot send a content-body with this verb-type. #27
Comments
@DeniseDornell Do you get any errors? You can try inspect to see the request and response JSON? You can implement a custom JSON serializer in order to do that https://github.com/klarna/kco_rest_dotnet/blob/v3.0/Klarna.Rest/Klarna.Rest.Core.Examples/CustomJsonSerializer.cs Also what happens if you use |
Getting the following error using both these methods(Client.Checkout.GetOrder(orderId).Result and Client.OrderManagement.GetOrder(orderId).Result ) Details: Exception Details: System.Net.ProtocolViolationException: Cannot send a content-body with this verb-type. [ProtocolViolationException: Cannot send a content-body with this verb-type.] |
Thanks to the Guillermo With his help we found an issue (I suppose for the older versions of .NET Core) when sending the GET requests. HTTP 1.1. Specification says, that GET request should not have a body (but it can have), but the reality, you will get a verb-type exception when sending the GET with a body inside. So the fix allows to set null when no body data instead of string.Empty |
Resolved by #35 , please get in touch if the issue persists |
Client.Checkout.GetOrder(orderId).Result and Client.OrderManagement.GetOrder(orderId).Result is just awaiting without any result
It works if I create a own request with HttpClient
The text was updated successfully, but these errors were encountered: