Skip to main content
Solved

REST Error: Cannot send a content-body with this verb-type.


Forum|alt.badge.img
  • Contributor
  • 12 replies

Hi,

TX ver: latest

 

I am getting an error when import metadata or doing table flattening. This worked fine earlier, before 3 june.

 

Works fine using Postman.

 

Any suggestion what I am missing?

 

“One or more errors occurred.
Failed to execute request for endpoint 'Get Charge Points'.
One or more errors occurred.
Cannot send a content-body with this verb-type.

System.AggregateException: One or more errors occurred. ---> System.Net.ProtocolViolationException: Cannot send a content-body with this verb-type.
   at System.Net.HttpWebRequest.CheckProtocol(Boolean onRequestStream)
   at System.Net.HttpWebRequest.BeginGetRequestStream(AsyncCallback callback, Object state)”

 

/Bjørn A.

Best answer by bjorn

Hi,

My fault...

 

access token → content-type = application/json

refresh token → content-type = application/json

all endpoints→ content-type = blank

 

Thanks for your time :-)

 

regards,

Bjørn A.

View original
Did this topic help you find an answer to your question?

10 replies

Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 1094 replies
  • June 6, 2025

Hi ​@bjorn 

What sort of content-type does it have in postman?

Do you manually state the Accept:application/json header?


Forum|alt.badge.img
  • Author
  • Contributor
  • 12 replies
  • June 6, 2025

Hi,

Yes, I use Accept and Content.-type : application/json

 

/Bjørn A.

 


Forum|alt.badge.img
  • Author
  • Contributor
  • 12 replies
  • June 6, 2025

Hi ​@Thomas Lind ,

 

Inside my endpoint I need to get an “{accessToken}” from auth/token and refresh-token endpoint.

Then I “override header” Authorization = {accessToken}.

 

/Bjørn A.


Forum|alt.badge.img
  • Author
  • Contributor
  • 12 replies
  • June 10, 2025

Hi ​@Thomas Lind 

 

Have you had any chance to look into this? 

The “content-type: application/json” is missing???

 

Content.-type is added i both “commen setting” and “the endpoint”

 


regards,

Bjørn A.


Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 1094 replies
  • June 10, 2025

Hi ​@bjorn 

Both in Postman and in TX it should be added automatically and shouldn’t need to be manually applied.

Have you tried to remove them and only have the Authorization part?


Forum|alt.badge.img
  • Author
  • Contributor
  • 12 replies
  • June 10, 2025

Hi,

I removed all accept and content-type., and only authorization part.

When I try to “Test connection” I get an error (see att.)

 


Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 1094 replies
  • June 10, 2025

Hi ​@bjorn 

I assume you aren’t on the newest version since you reference a day when it stopped working.

You aren’t forcing a data type in the Authentication part so it should default to whatever is sent by the API.

It seems odd that it adds a Text content-type. Does it also do this in Postman?


Forum|alt.badge.img
  • Author
  • Contributor
  • 12 replies
  • June 10, 2025

Hi ​@Thomas Lind 

 

I found the solution,all good :-)

 

regards,

Bjørn A.


Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 1094 replies
  • June 11, 2025

Hi ​@bjorn 

What was the solution then? I am a bit curious.


Forum|alt.badge.img
  • Author
  • Contributor
  • 12 replies
  • Answer
  • June 11, 2025

Hi,

My fault...

 

access token → content-type = application/json

refresh token → content-type = application/json

all endpoints→ content-type = blank

 

Thanks for your time :-)

 

regards,

Bjørn A.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings