Add response headers to APIRequest

This commit is contained in:
Daniel 2023-09-05 12:50:42 +02:00
parent f2208faf8c
commit 82ed043721
2 changed files with 6 additions and 0 deletions

View file

@ -436,6 +436,9 @@ func (e *Endpoint) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
// Add response headers to request struct so that the endpoint can work with them.
apiRequest.ResponseHeader = w.Header()
// Execute action function and get response data
var responseData []byte
var err error