implements PUT request
adds a middleware function to change the header field
responses with whole JSON file