Correctly set content type when specified in pollin headers
Some checks are pending
tests / ci (push) Waiting to run

This commit is contained in:
Jamie Shiell 2026-02-08 15:37:41 +00:00 committed by Benjamin Nussbaum
parent 344286a5d3
commit 0aa38428f6
2 changed files with 26 additions and 1 deletions

View file

@ -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 {