Fixed #23977 -- Added setdefault method to HttpResponse

Ticket #23977. Created set_default method for more convenient default headers setting in HttpResponse.
remove trailing whitespace to appease flake8