Files
floci/docs/services
Matheus Oliveira 34f592f7e7 fix(apigateway): answer an HTTP API proxy result without a Content-Type as text/plain (#6201)
* fix(apigateway): answer an HTTP API proxy result without a Content-Type as text/plain

Measured on AWS (eu-west-1, 2026-10-19): an HTTP API answers a Lambda proxy
result that carries a body and no Content-Type header of its own with
text/plain; charset=utf-8, in both payload formats. Floci fell back to
application/json, the REST API's default, so a client that trusts the
header read a plain body as JSON.

The fallback now follows the API kind: an HTTP API answers text/plain, a
REST API keeps answering application/json.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* test(apigateway): fold the Content-Type cases into the inference test

The three cases repeated the inference test's setup, route helper and
cleanup, so they join it: two results without a Content-Type in the two
payload formats, and one that names application/json. The docs say a
statusCode and a body, since a format 2.0 result without a statusCode
still takes the inferred JSON path, and the compatibility test's get
helper and parameterized name are back on one line each.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

---------

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-22 16:04:51 -04:00
..
2026-08-21 00:09:04 -04:00
2026-10-21 06:47:06 -04:00