Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flatten header array so it's easier to access headers #374

Merged
merged 1 commit into from
Feb 19, 2018
Merged

Conversation

mthenw
Copy link
Contributor

@mthenw mthenw commented Feb 19, 2018

This PR flattens the headers object that it's passed to the functions. Previously it was map[string][]string which means that user always had to take the first element of an array. Not it's map[string]string so user is able to access header simper e.g. event.data.headers['Content-Type'].

In case of multivalue headers they are concatenated with , according to HTTP spec.

@mthenw mthenw merged commit 2ddbcf9 into master Feb 19, 2018
@mthenw mthenw deleted the headers branch February 19, 2018 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant