WebRequest(): "Accept: application/json" header not working? - page 2

 
Ohh, yes... Of course.

It's the accept header field. This is informing the server about the ability of the client to process data types.

The header you would need to set is the Content-Type
header.

EDIT:

nope! I was wrong.
 
Alain Verleyen #:
I worked around it using a Socket(), in my case it was suitable. But if Metaquotes can at clarify why they are doing that it would be interesting.

@Alain Verleyen can you share the Socket based http client where we can get around the Accept: */* issue please? Thanks

 

It's fixed.

There is no problem on build 3295. 👍

[response_headers]
Host: localhost
Date: Thu, 19 May 2022 11:39:26 GMT
Connection: close
X-Powered-By: PHP/7.4.6
Cache-Control: no-cache, private
Date: Thu, 19 May 2022 11:39:26 GMT
Content-Type: application/json
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59