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 /headers endpoint to httpbin #388

Merged
merged 2 commits into from Sep 6, 2023
Merged

add /headers endpoint to httpbin #388

merged 2 commits into from Sep 6, 2023

Conversation

Choraden
Copy link
Contributor

@Choraden Choraden commented Sep 4, 2023

This adds /headers endpoint to httpbin, which returns the incoming request's HTTTP headers.

The test TestProxyUpstream has been adjusted to use /headers.

The endpoint returns the incoming request's HTTTP headers. Same as `httpbin.org/headers` [1].

[1] https://httpbin.org/#/Request_inspection/get_headers

Fixes #384
@mmatczuk
Copy link
Contributor

mmatczuk commented Sep 6, 2023

LGTM.

You could also remove the /header endpoint as not part of the spec and takes the validation responsibility from the test wich results in double validation (to provide status code and the validation of the status code itself).

@mmatczuk mmatczuk merged commit e47d6ff into main Sep 6, 2023
3 checks passed
@mmatczuk mmatczuk deleted the hg/httpbin-headers branch September 6, 2023 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants