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

Missing features compared to httpbin.org #6

Closed
na-- opened this issue Mar 22, 2018 · 6 comments
Closed

Missing features compared to httpbin.org #6

na-- opened this issue Mar 22, 2018 · 6 comments
Labels
compat Tracking issues around compatibility with original httpbin implementation

Comments

@na--
Copy link
Contributor

na-- commented Mar 22, 2018

The following httpbin.org features (besides /brotli) are not present in the library:

  • now.httpbin.org The current time, in a variety of formats. (this probably will be more useful as a /now url...)
  • /uuid Returns UUID4.
  • /anything Returns request data, including method used.
  • /anything/:anything Returns request data, including the URL.
  • /base64/:value Decodes base64url-encoded string.

None of them are a big deal, just posting this for completion. If I have the time, I may implement some of them, though I doubt that will be very soon.

@Integralist
Copy link

Ah yeah I see a whole truckload of cool features in official website version. Would be great to see this back ported. @mccutchen maybe a hack week project for me 🙂

@mccutchen
Copy link
Owner

@Integralist go for it! A pile of new endpoints have been added recently by @saurabh-hirani:

@saurabh-hirani
Copy link
Contributor

@Integralist - go-httpbin handler and testing code is very well thought out - thanks to @mccutchen
As per https://github.com/postmanlabs/httpbin/blob/master/httpbin/core.py - we are almost feature complete - save for the /anything endpoint. I was going to work on it over the coming weekend. If you are interested in picking it up, bump this comment up.

@Integralist
Copy link

I ♥️ the /anything endpoint. I'm on leave for a few weeks but when I'm back it will be just in time for hack week 😀

@mccutchen mccutchen added the compat Tracking issues around compatibility with original httpbin implementation label Nov 11, 2022
@mccutchen
Copy link
Owner

I'm going to call this one done, for now. Everything but time.httpbin.org has been implemented, and we can use #91 to track any other incompatibilities/missing features/etc.

@mccutchen
Copy link
Owner

I'm going to call this one done, for now. Everything but time.httpbin.org has been implemented, and we can use #91 to track any other incompatibilities/missing features/etc.

Turns out I missed a relatively big one that is now being addressed: #123

mccutchen pushed a commit that referenced this issue Jun 18, 2023
```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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compat Tracking issues around compatibility with original httpbin implementation
Projects
None yet
Development

No branches or pull requests

4 participants