Skip to content
Snippets Groups Projects
Commit 84b562be authored by Jan Semmelink's avatar Jan Semmelink
Browse files

Update API to return no content for handlers without a response

parent a5ba572a
No related branches found
No related tags found
No related merge requests found
...@@ -273,6 +273,10 @@ func (api Api) Handler(baseCtx context.Context, apiGatewayProxyReq events.APIGat ...@@ -273,6 +273,10 @@ func (api Api) Handler(baseCtx context.Context, apiGatewayProxyReq events.APIGat
} }
res.Headers["Content-Type"] = "application/json" res.Headers["Content-Type"] = "application/json"
res.Body = string(bodyBytes) res.Body = string(bodyBytes)
} else {
//no content
delete(res.Headers, "Content-Type")
res.Body = ""
} }
return return
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment