An open API service indexing awesome lists of open source software.

https://github.com/ajsalemo/custom-response-header-examples

Multiple examples on various stacks on how to add custom response headers to an application.
https://github.com/ajsalemo/custom-response-header-examples

apache azure containers docker dotnet http java linux nginx node php python response-headers webserver

Last synced: 3 months ago
JSON representation

Multiple examples on various stacks on how to add custom response headers to an application.

Awesome Lists containing this project

README

          

# custom-response-header-examples
Multiple examples on various stacks on how to add custom response headers to an application.

- **dotnet**
- This contains an example with ASP .NET Core 6 MVC
- Documentation on the ResponseHeaders class can be found [here](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.http.headers.responseheaders.headers?view=aspnetcore-6.0#microsoft-aspnetcore-http-headers-responseheaders-headers).
- **java**
- This contains an example with Spring Boot
- Spring documentation on adding [headers](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/HttpHeaders.html#set-java.lang.String-java.lang.String-) to a [Response Entity](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/ResponseEntity.html).
- **node**
- This contains an example with Express
- [Documentation](https://expressjs.com/en/5x/api.html#res.set) for Express.
- [Documentation](https://nodejs.org/api/http.html#responsesetheadername-value) for plain Node.
- **php**
- This contains an example with Laravel and plain PHP
- Laravel's response object documentation can be found [here](https://laravel.com/docs/9.x/responses#attaching-headers-to-responses)

- PHP header [documentation](https://www.php.net/manual/en/function.header.php)
- **python**
- This contains an example with Flask
- Flask [documentation](https://flask.palletsprojects.com/en/2.1.x/api/?highlight=headers#response-objects) on response headers.

- Django [documentation](https://docs.djangoproject.com/en/4.0/ref/request-response/#setting-header-fields-1) on response headers.