Closed haydenwoodhead closed 6 years ago
@haydenwoodhead - what are you trying to accomplish?
I didn't do a very good job of explaining.
I am trying to have my lambda project return html. If I migrate my project from the http standard library to aws-lamda-go-api-proxy the content type of my pages is no longer set to text/html instead it defaults to application/json if no other content type is set. I can solve this my manually by setting my content type.
What I am proposing is to call http.DetectContentType on write if no other content type is set. This is what the standard library does and I think would make this project more of a 'drop-in' replacement for it.
Ah, thanks @haydenwoodhead, makes sense. I'll do some tests with it over the next couple of days and update the framework.
Addressed in the latest commit.
It would be nice if this detected content type on Write (just as the standard library does) rather than leave it unset.
I would be willing to work on this.