Skip to content

Commit

Permalink
#288 #457 Include the error message in the documentation so that it i…
Browse files Browse the repository at this point in the history
…s searchable
  • Loading branch information
mnapoli committed Sep 26, 2019
1 parent 2c87c2c commit 72a81a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/runtimes/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ provider:

This will make API Gateway support binary responses for all responses. Your application can now return binary responses as usual.

**However, you must define a `Content-Type` header on binary responses.** If you use [Symfony's helpers](https://symfony.com/doc/current/components/http_foundation.html#serving-files) or [Laravel's helpers](https://laravel.com/docs/5.8/responses#file-downloads) for file downloads, then you don't need to do anything. If you don't, here are some examples:
**However, you must define a `Content-Type` header on binary responses.** If you don't, you may get the following error: *Failed encoding Lambda JSON response: Malformed UTF-8 characters, possibly incorrectly encoded*. [Symfony's helpers](https://symfony.com/doc/current/components/http_foundation.html#serving-files) or [Laravel's helpers](https://laravel.com/docs/5.8/responses#file-downloads) will take care of that for you. If you don't use them, here are some examples:

```php
// Vanilla PHP example with a JPEG image response:
Expand Down

0 comments on commit 72a81a5

Please sign in to comment.