on-internet
← Community

Unexpected HTTP/1.x request: POST /3/device/XXXX

Stack Overflow ·

Hi i am sending IOS push notifications using apns and curl in php and getting this error message. I also define 'CURL_HTTP_VERSION_2_0' but still getting this error: Unexpected HTTP/1.x request: POST /3/device/ Here is my code: $key_file = XXXXXX'; $secret = null; $private_key = JWKFactory::createFromKeyFile($key_file, $secret, [ 'kid' => '3W6B5LQQHX', 'alg' => 'ES256', 'use' => 'sig', ]); $payload = [ 'iss' => 'RUK725A7V4', 'iat' => time(), ]; $header = [ 'alg' => 'ES256', 'kid' => $private_key->get('kid'), ]; $jws = JWSFactory::createJWSToCompactJSON( $payload, $private_key, $header ); if (!

Comments

Sign in or sign up to comment and upvote.

No comments yet.