Axios Error – HPE_INVALID_CONSTANT error “Error: Parse Error: Expected HTTP/”

curl -v –location ‘http://api.mast.com/webservice/fourthparty/content/apple/fallback?content_id=236&product=EEF’ –header ‘PRODUCT: EEF’ | hexdump -C

Trying to make the same call using POSTMAN and Axios(JS code), they are not able to parse the response when https is used in URL

Error : HPE_INVALID_CONSTANT error "Error: Parse Error: Expected HTTP/"

204 returned by a server
, curl works fine on terminal

hexdump of the response is 0 bytes in both the cases.

Response of the HTTP call on Terminal

< HTTP/1.1 204 No Content
< Cache-Control: max-age=0
< Content-Type: application/json
< Date: Fri, 05 Jan 2024 14:20:52 GMT
< Server: nginx/1.10.3
< Via: 1.1 google
< X-Cache: BYPASS
< x-edgecast-rewrite: /80E/api.mast.com/webservice/fourthparty/content/apple/fallback
< x-edgecast-rules: 0.57K11-v14
< X-Powered-By: PHP/5.4.45
< 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Connection #0 to host api.mast.com left intact

Response of HTTPS call on Terminal

< alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
< cache-control: max-age=0
< content-type: application/json
< date: Fri, 05 Jan 2024 14:20:43 GMT
< server: nginx/1.10.3
< via: 1.1 google
< x-cache: BYPASS
< x-edgecast-rewrite: /80E/api.mast.com/webservice/fourthparty/content/apple/fallback
< x-edgecast-rules: 0.57K11-v14
< x-powered-by: PHP/5.4.45
< 
{ [0 bytes data]
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Connection #0 to host api.mast.com left intact

Is the parsing issue due to a different version of HTTP protocol or encoding with HTTPS or some header causing the issue or something else ?