I created a pass and web service. Now I can add this pass to device and also can register device to my server. I save data such as deviceID, passTypeIdentifier, pushToken, serialNo and authenticationToken, but I not yet return http status such as 201, 200, 401,... How do I response these http status to device ?
Asked
Active
Viewed 126 times
0
-
See this answer http://stackoverflow.com/questions/3258634/php-how-to-send-http-response-code – PassKit Apr 04 '13 at 02:55
-
Thanks ! I have search and test with header too, but when I test, I don't see that response ! – malinchhan Apr 04 '13 at 03:50
1 Answers
0
Before you send any content back to the device, add the following code:
If using PHP 5.4 or later:
$response_code = 201; // replace with required response code
http_response_code($response_code);
If using <= PHP 5.3:
$response_code = 201; // replace with required response code
header('X-PHP-Response-Code: ' . $response_code, true, $response_code);
In the console log, you should see the response code returned for each request that the device sends.
..... got response with code 201

PassKit
- 12,231
- 5
- 57
- 75