gateway icon indicating copy to clipboard operation
gateway copied to clipboard

Added support for multiple header value in API Gateway

Open mattdelaf opened this issue 7 years ago • 4 comments

Last October AWS announced support for multi-value headers.

Since version 1.8.1, aws-lambda-go package events supports multi-value headers as map[string][]string.

This is particularly useful for setting multiple cookies. This is a quick fix proposal.

mattdelaf avatar Jan 07 '19 12:01 mattdelaf

ahah silly AWS APIs..., looks good to me though, mind adding a test? I suppose we could probably always just set the multiple headers one? Since Go gives you a slice anyway

tj avatar Jan 08 '19 14:01 tj

@mattdelaf You have to implement on the Request side as well.

https://github.com/apex/gateway/blob/master/request.go#L51 https://github.com/aws/aws-lambda-go/blob/HEAD/events/apigw.go#L11

dimiro1 avatar Jan 08 '19 15:01 dimiro1

How do you use this library can someone add full route request with parsed response

davidfaynzilberg avatar Nov 21 '19 22:11 davidfaynzilberg

@davidfaynzilberg check out the readme, there's an example. It's basically a drop-in replacement for net/http for Lambda

tj avatar Nov 25 '19 10:11 tj