Error 411 missing content-length when doing av http.Post

lock
push_pin
done
Answered
1

I get "HTTP Error 411. The request must be chunked or have a content length." when I do a post. It's working from Postman and JavaScript. But not from CRM-script. The header Content-Length is correct, but it seems that it does not "read" it. 

Anyone?

From debug log:

=> Send header
POST /api/sale HTTP/1.1
Host: api.123.no
Accept: */*
Content-Type: application/json
Authorization: xxxxxxxxxxxxxxxxxxxxxxxx
Content-Length: 100
traceparent: 00-ed27b3cd060c4144a33c4a6f5e705d16-d6bbf292bd167881-01

=> Send data
{"OrderDate": "2024-09-06 13:53:13","OurRef": "Frode Folleras","CustomerNo": "12345", "Lines": [{}]}

<= Recv header
HTTP/1.1 411 Length Required

6 Sep 2024 | 11:59 AM

All Replies (1)

Hi,

If you post the same request using CRMScript to 'https://httpbin.org/post', do you also get an error then?

 

9 Sep 2024 | 01:43 PM

Add reply