Last active
March 16, 2016 16:39
-
-
Save ramlev/d57e4564a2fb4c20982b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use GuzzleHttp\Client; | |
$client = new Client(); | |
$client->request('POST', 'http://localhost:8080/ag-push/rest/applications/{PUSH_ID}/iOS', [ | |
'debug' => true, | |
'headers' => [ | |
'Authorization' => 'Bearer OAUTHTOKEN', | |
'Accept' => 'application/json' | |
'Content-type' => 'multipart/form-data', | |
], | |
'multipart' => [ | |
[ | |
'name' => 'production', | |
'contents' => 'true', | |
], | |
[ | |
'name' => 'passphrase', | |
'contents' => 'passw0rd', | |
], | |
[ | |
'name' => 'certificate', | |
'contents' => fopen('/Users/matzew/Desktop/MyProdCert.p12', 'r'), | |
], | |
], | |
]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User-Agent: GuzzleHttp/6.1.1 curl/7.47.1 PHP/5.6.19 | |
Content-Type: multipart/form-data; boundary=56e97c6435a37 | |
Authorization: Bearer OAUTHTOKEN | |
Content-Length: 1838 | |
* upload completely sent off: 1838 out of 1838 bytes | |
< HTTP/1.1 400 Bad Request | |
< Date: Wed, 16 Mar 2016 15:31:49 GMT | |
< Server: WildFly/8 | |
< Expires: 0 | |
< Cache-Control: no-cache, no-store, must-revalidate | |
< X-Powered-By: Undertow/1 | |
< Pragma: no-cache | |
< Content-Type: text/html | |
< Content-Length: 80 | |
< Connection: close | |
< |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment