mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-03-14 12:23:33 +00:00
Correctly set content type when specified in pollin headers
Some checks are pending
tests / ci (push) Waiting to run
Some checks are pending
tests / ci (push) Waiting to run
This commit is contained in:
parent
344286a5d3
commit
0aa38428f6
2 changed files with 26 additions and 1 deletions
|
|
@ -192,8 +192,12 @@ class Plugin extends Model
|
|||
$httpRequest = Http::withHeaders($headers);
|
||||
|
||||
if ($this->polling_verb === 'post' && $this->polling_body) {
|
||||
$contentType = (array_key_exists('Content-Type', $headers))
|
||||
? $headers['Content-Type']
|
||||
: 'application/json';
|
||||
|
||||
$resolvedBody = $this->resolveLiquidVariables($this->polling_body);
|
||||
$httpRequest = $httpRequest->withBody($resolvedBody);
|
||||
$httpRequest = $httpRequest->withBody($resolvedBody, $contentType);
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue