Skip to content

Commit

Permalink
Fix content-type on http clients
Browse files Browse the repository at this point in the history
  • Loading branch information
charrondev committed Sep 13, 2023
1 parent d9e6b4f commit 4ab9614
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
],
"require": {
"vanilla/garden-http": "^2.6",
"vanilla/garden-http": "^2.8",
"ext-json": "*",
"php": ">=7.4",
"vanilla/garden-utils": "^1.0.1",
Expand Down
1 change: 1 addition & 0 deletions src/Clients/OrchHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function __construct(string $orchBaseUrl, string $accessToken)
{
parent::__construct($orchBaseUrl);
$this->setThrowExceptions(true);
$this->setDefaultHeader("content-type", "application/json");
$this->setDefaultHeader("X-Access-Token", $accessToken);
}

Expand Down
1 change: 1 addition & 0 deletions src/Clients/SiteHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function __construct(Site $site, HttpHandlerInterface $handler = null)
parent::__construct($site->getBaseUrl(), $handler);

$this->setBaseUrl($this->getBaseUrl());
$this->setDefaultHeader("content-type", "application/json");
$this->setDefaultOption("timeout", 2);
}

Expand Down

0 comments on commit 4ab9614

Please sign in to comment.