awslabs / awslabs/aws-lambda-cpp
Lambda return types through HTTP API Gateway - only json array or json object are working , else error 500
- Ngôn ngữ chính
- C++
- Star
- 465
- Fork
- 98
- Merge trung bình
- 12 giờ 47 phút
- Pull request đã merge (30 ngày)
- 3
Mô tả
I'd like to return binary data through the HTTP API Gateway (HTTP , NOT REST API!), but the response has to be a json object, always. Is there some workaround to make that happen like it is possible for the REST API ?
```
#include
using namespace aws::lambda_runtime;
static invocation_response my_handler(invocation_request const& req)
{
return invocation_response::success("binarygoeshere", "application/zip");
}
int main()
{
run_handler(my_handler);
return 0;
}
```
^this returns error code 500
Hướng dẫn đóng góp
Hướng nghiên cứu
Start with invocation_response::success and the run_handler path shown in the example, then trace how the response is serialized for HTTP API Gateway. Check whether existing response-serialization tests cover non-JSON payloads. Done means establishing and testing a supported way for binary data with content type application/zip to avoid the HTTP 500 response.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- aws, cpp
- Lĩnh vực
- api, cloud
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100