Show HN: Prestige, a text based HTTP client, for working with HTTP APIs
prestigemad.com
prestigemad.com
Hope you like it.
The syntax looks simple, and the results are clearly formatted - just trying to understand what kind of workflow makes this favorable to something like curl or python-requests.
I use this to play with and test APIs I'm developing, or APIs that I want to develop against. For example. GitHub has a public API that can be used to access repositories and details about the repositories. I use Prestige to try out an example request, and tune the request to get the exact response that I want and _then_ translate it to use python-requests (if I want to use it in Python) or something else.
Since chromium-based browsers will generate curl requests from the network tab of devtools, you can use that along with the above to quickly generate code to replay requests with python.
Lets you save your requests alongside your code, you can even define variables and do multi-step requests etc..
One feature of postman/hoppscotch[0] is that it makes it easy to do oauth2 calls PRIOR to hitting the actual desired endpoint. If you're itching to add new features may I suggest that might be a good one :) ?
Thanks for your work.
Not kidding, I was thinking about how I could make talking to APIs behind an OAuth wall easier in Prestige, just this morning (it's evening for me now). I didn't know Postman and Hoppscotch did that. I'll ideate for some time first and then see how they solved it.
But yes, I do want to add something like this in the future. Thanks for the pointer!
Is there a way to persist my session? In a tool I wrote a while ago I added a really lightweight gist integration - you could connect to github, then hit save in the app and it'd do a client-side save to GitHub and update your URL to match the gist ID.
Then, on returning to the page, if there was a gist ID in the URL, it'd fetch it from github.
EDIT: Ah, just found the browser local storage option.
I haven’t thought about Gist specifically though. That’s a good idea. Let me explore what can be done with it. Thanks again!
Also reminds me of JetBrains' client: https://www.jetbrains.com/help/phpstorm/http-client-in-produ...
I was actually using the JetBrains version of this idea until a few years ago. The thing that put me off there was that the results weren't visible instantly. I had to click and open another file to see the results. Having a split pane open with the results was something I sorely missed.
Yes, all of those are indeed things I want to add. I plan is to have a headless runner, like a `prestige-run` command that will take a Prestige sheet file and run the JS blocks, HTTP requests in it and report the result of assertions. It's some distance away, yes, but hopefully, I'll get there :)
JS blocks that take the response of a request to assert values is currently not there. This is something I myself wanted on so many occasions, but haven't got around to doing it. Thanks for chiming in, I'll take your word as a vote of interest on this feature ;)
But saving all the HTML/CSS/JS and running it locally should work fine nonetheless though. What I'm a bit doubtful of is, if it would be able to do the XHR calls on file:// protocol. I'm not sure about how the browsers of today behave there.
Also, OAuth integration? Prestige has OAuth? (surprised-pikachu-face.gif)
As long as the endpoint being fetched returns the correct CORS headers, fetch should work on file:// pages. You just can't fetch other file:// URIs with it.
> Prestige has OAuth? (surprised-pikachu-face.gif)
Not yet, but:
> Integrations with more storage providers like GitHub and Dropbox coming soon.
I think you're planning on adding it sooner or later :p
Yep, I do want to integrate with those services and that will involve OAuth. You just zoomed into the future and gave me kind of a wake-up call treating it as if it's already there! :)
Will check this out. Thanks!
POST https://api.github.com/graphql
Content-Type: application/json
Authorization: Bearer github-personal-api-token
={query: `
{
repository(owner: "appsmithorg", name: "appsmith") {
releases(orderBy: {field: CREATED_AT, direction: DESC}, first: 20) {
nodes {
tagName
name
url
descriptionHtml: descriptionHTML
createdAt
publishedAt
isDraft
isPrerelease
}
totalCount
}
}
}
`}
Know more about this way of running queries at http://localhost:3045/docs/guides/templating/.