-
Notifications
You must be signed in to change notification settings - Fork 49
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
Failing to write a response containing headers #161
Comments
Here is my best try using a struct, but it fails due to the wrong function signature:
error:
error if changing function signature to "func Main(inobj map[string]interface{}) string {":
|
I actually managed to set a header:
I hereby request to extend the documentation with a nice example. |
please send a pr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I am currently trying to create a response containing headers in openwhisk with golang.
I feel like I need a nested map with different value types. But since golang is strongly-typed that is impossible.
I tried to marshal a struct, but failed since the Main functions wants a map as return value.
My best try as response is:
But invoking that action gives an http error.
The reason for that error is the content of the "headers" key. Uncommenting it makes the action work.
Can someone provide an example how to set headers in the golang response?
The text was updated successfully, but these errors were encountered: