-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
suggestion: json response #42
Comments
Hi @donpdonp , Thanks for the suggestion. That would definitely be a nice to have. I'll take it into consideration 👍 |
I would love to work on this feature, but I am having trouble understanding the current setup. Using the start script, the separate pages are not being displayed and it defaults to root. I assume that they are created in the production build with the react-snap command. However, the post-render script deletes all those created pages for some reason I do not really understand, which means there are still no separate status pages. Would you care to explain it to me? Imo 401.json would be better, as there already is support for 401.jpg as well. |
Hi @Tijmen34 There are no separate pages. Only the index file. HTTP Cats is an image API, so when you go to |
@Tijmen34 and yes, one workaround could be using extensions like the example you provided. So if you open a PR with a json file for each status image, I'll be glad to merge it and adapt the Nginx configuration to serve that when the extension is |
this snippit will pull http status codes from the wikipedia page of List of HTTP Status Codes, and builds a json file for each one. (note, required the 'pup' html command line parser)
|
It has been a long time, but I found this issue again 😆 . I took note of @donpdonp script and created one that does not use pup and can simply be ran with bash. I can also add the actual files if that is more desirable or change bash -> sh to be in line with the other scripts. Let me know @rogeriopvl |
it'd be useful to request https://http.cat/401 with either "Accept: application/json" or /401.json to get a response similar to
mostly I am looking for a data source for an irc bot to respond to "!http 401".
The text was updated successfully, but these errors were encountered: