skip to Main Content

Php versions – PHP Curl – Received HTTP/0.9 when not allowed

I stumbled over a weird behavior when I try to send a post HTTP/2.0 request to apples push service: $http2ch = curl_init(); curl_setopt($http2ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0); curl_setopt($http2ch, CURLOPT_URL, 'https://api.push.apple.com/3/device/megauniquedevicetokendummy'); curl_setopt($http2ch, CURLOPT_PORT, 443); curl_setopt($http2ch, CURLOPT_HTTPHEADER, $httpHeader); curl_setopt($http2ch, CURLOPT_POST, true); curl_setopt($http2ch, CURLOPT_POSTFIELDS, $body);…

VIEW QUESTION

Upload File in form data using Java – Apache

I am trying to perform a HTTP Post Request in Java using the Apache API. With curl the request looks like this curl https://host/upload -X POST -H "Authorization: Bearer xxx" -H "Content-Type: multipart/form-data" -H "Accept: application/json" -F "file=@{PathToImage}" -F "type=file"…

VIEW QUESTION
Back To Top
Search