Expand webhook code.

This commit is contained in:
James Cole
2022-09-17 07:08:30 +02:00
parent 10f2cf2481
commit ad9efde2d0
44 changed files with 1014 additions and 99 deletions

View File

@@ -30,7 +30,7 @@ class AcceptHeaders
throw new BadHttpHeaderException('Your request must accept either application/json or application/vdn.api+json.');
}
if (('POST' === $method || 'PUT' === $method) && 'application/json' !== (string)$request->header('Content-Type')) {
$error = new BadHttpHeaderException('B');
$error = new BadHttpHeaderException('Content-Type must be application/json');
$error->statusCode = 415;
throw $error;
}