Permalink
Browse files

Merge pull request #16 from Shapeways/nw-content-header

adding Content-Type header for our remaining php POST samples
  • Loading branch information...
2 parents 3153cc2 + 005acee commit 6a47fe39c63d2e30387ee1ee2e3924f67e0e4ffd Nicole committed on GitHub Sep 1, 2016
Showing with 2 additions and 2 deletions.
  1. +1 −1 php-pecl/OrderReprint-oauth1-pecl.php
  2. +1 −1 php-pecl/PriceModel-oauth1-pecl.php
@@ -27,7 +27,7 @@
);
$data_string = json_encode($data);
- $oauth->fetch($api_url_base . "/orders/$orderId/reprint/v1", $data_string, OAUTH_HTTP_METHOD_POST, array("Accept" => "application/json"));
+ $oauth->fetch($api_url_base . "/orders/$orderId/reprint/v1", $data_string, OAUTH_HTTP_METHOD_POST, array("Accept" => "application/json", "Content-Type" => "application/json"));
$response = $oauth->getLastResponse();
$json = json_decode($response);
@@ -35,7 +35,7 @@
);
$data_string = json_encode($data);
- $oauth->fetch($api_url_base ."/price/v1", $data_string, OAUTH_HTTP_METHOD_POST, array("Accept" => "application/json"));
+ $oauth->fetch($api_url_base ."/price/v1", $data_string, OAUTH_HTTP_METHOD_POST, array("Accept" => "application/json", "Content-Type" => "application/json"));
$response = $oauth->getLastResponse();
$json = json_decode($response);
if (null == $json) {

0 comments on commit 6a47fe3

Please sign in to comment.