-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add method property to responses (#123)
```console # before: httpbingo lacks the "method" field but httpbin.org has it $ curl -s https://httpbingo.org/anything | jq .method 9:31PM null $ curl -s https://httpbin.org/anything | jq .method "GET" # after: httpbingo has the method field! $ curl -s http://0.0.0.0:8080/anything | jq .method "GET" ``` This was mentioned in #6, but then not listed in #91 - I took the highly technical testing approach of adding a test for `Method` anywhere in `handlers_test.go` that mentioned `Args`; do you desire more tests? fewer tests? - Anywhere else I should add this field that I didn't already? For what it's worth, I discovered this when working on upgrading the testing for our [httpsnippet library](https://github.com/readmeio/httpsnippet); I wanted to use `go-httpbin` but our tests expect the method field to be present in the responses
- Loading branch information
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters