Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

How to create APIGW --response-type http with Serverless #80

@allansduarte

Description

@allansduarte

Hi there!

I am looking for guidelines for creating apigw that responds to the content-type header.

Whenever I create an API via Serverless it seems that the content-type is always JSON, I'm looking for a 'content-type': 'text/html'.

That works like this:

Payload:

return {
   headers: {
     'content-type': 'text/html'
   },
   body: '123456',
     statusCode: 200
   };

Output:
123456

It works perfectly when creating with wsk CLI, but with serverless no.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions