mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Make application/json as default
This commit is contained in:
parent
c8d04c11eb
commit
8667e9f821
1 changed files with 3 additions and 3 deletions
|
|
@ -1952,12 +1952,12 @@ App::post('/v1/functions/:functionId/executions')
|
|||
$execution->setAttribute('responseBody', $executionResponse['body'] ?? '');
|
||||
$execution->setAttribute('responseHeaders', $headers);
|
||||
|
||||
$isJson = false;
|
||||
$isJson = true;
|
||||
|
||||
$acceptTypes = \explode(', ', $request->getHeader('accept', 'application/json'));
|
||||
foreach ($acceptTypes as $acceptType) {
|
||||
if (\str_starts_with($acceptType, 'application/json') || \str_starts_with($acceptType, 'application/*')) {
|
||||
$isJson = true;
|
||||
if (\str_starts_with($acceptType, 'multipart/form-data') || \str_starts_with($acceptType, 'multipart/*')) {
|
||||
$isJson = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue