INNER CODE UNIT · Go
newAPIGatewayV1Response
akrylysov/algnhsa · apigw_v1.go:53
func newAPIGatewayV1Response(r *http.Response) (lambdaResponse, error) {
resp := lambdaResponse{
MultiValueHeaders: r.Header,
}
return resp, nil
}
// APIGatewayV1RequestFromContext extracts the APIGatewayProxyRequest event from ctx.
func APIGatewayV1RequestFromContext(ctx context.Context) (events.APIGatewayProxyRequest, bool) {
val := ctx.Value(RequestTypeAPIGatewayV1)
if val == nil {
return events.APIGatewayProxyRequest{}, false
}
event, ok := val.(events.APIGatewayProxyRequest)
return event, ok
}