Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to set response headers per endpoint #4

Closed
nodesocket opened this issue Apr 20, 2019 · 7 comments
Closed

Add the ability to set response headers per endpoint #4

nodesocket opened this issue Apr 20, 2019 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@nodesocket
Copy link

Add the ability to specify key => value response headers per endpoint.

@boyney123
Copy link
Owner

Great idea @nodesocket , I will add it on the TODO list, and hopefully, get something out this week

@boyney123 boyney123 added the enhancement New feature or request label Apr 21, 2019
@boyney123 boyney123 self-assigned this Apr 21, 2019
@boyney123
Copy link
Owner

This might be simular to #23 .

Maybe the UI can have some key value pairs that are captured and sent.

@boyney123
Copy link
Owner

image

Started to implement it, just working on the small details and maybe some validation.

@nodesocket
Copy link
Author

nodesocket commented Apr 23, 2019

@boyney123 awesome. 👍 One edge case, what happens if I put a header key that is outputted by the server already? Example: Content-Type: text/plain.

@mu99y
Copy link

mu99y commented Apr 25, 2019

@boyney123 Awesome 👍

@boyney123
Copy link
Owner

image

Been working abit on this feature, hopefully, get it live this week 👍

One edge case, what happens if I put a header key that is outputted by the server already? Example: Content-Type: text/plain.

I will test this and see what happens, Im guessing something will just get overridden, but il check it out!

boyney123 added a commit that referenced this issue May 23, 2019
* Started to add custom headers

* Tmp

* #4 - Added the ability to add headers in the routes
boyney123 added a commit that referenced this issue May 24, 2019
* Add the ability to group routes (#42)

* First version of grouping routes

* Switched to new calculation of groups and styled them

* Added group routing based on togglable state

* Updated package-lock

* DB - Moved some components around, added some tests and fixed jest running tests

* DB - Added more test coverage

* Removed useless header x-powered-by (#45)

* Improved methods and status codes (#44)

* DB - Fixing tests for new routes that were added as part of #44

* Added CHANGELOG

* Feature - Add support for adding headers onto responses (#46)

* Started to add custom headers

* Tmp

* #4 - Added the ability to add headers in the routes

* Updated CHANGELOG

* DB - Format of settings

* Updated version
@boyney123
Copy link
Owner

I'm happy to share with you that this feature is now live with MockIt 1.1.0 🎉

Head over to https://mockit.netlify.com/blog/ to find out more details

https://mockit.netlify.com/docs/routes/route-features#response-headers

Thanks for the idea @nodesocket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants