-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made README much smaller (and hopefully less daunting)
- Loading branch information
Showing
10 changed files
with
106 additions
and
730 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
## Installation | ||
1. Download and install [Sublime Text 3](https://www.sublimetext.com/3). | ||
2. Install [Package Control for Sublime Text](https://packagecontrol.io/). | ||
3. Open the command palette <kbd>shift+cmd+p</kbd> and type __Package Control: Install Package__. | ||
4. Search for __Requester__ (not ~~Http Requester~~) and install it. | ||
5. __If you're seeing errors__ every time you run a request, this probably means the __requests__ dependency wasn't installed successfully. To fix this, look for __Package Control: Satisfy Dependencies__ in the command palette, run it, and restart Sublime Text. | ||
|
||
|
||
## Getting Started | ||
Open the interactive tutorial in Sublime Text! Look for __Requester: Show Tutorial__ in the command palette. | ||
|
||
Or, open a file and insert the following. | ||
|
||
~~~py | ||
requests.get('https://jsonplaceholder.typicode.com/albums') | ||
requests.post('https://jsonplaceholder.typicode.com/albums') | ||
|
||
get('https://jsonplaceholder.typicode.com/posts') # 'requests.' prefix is optional | ||
post('jsonplaceholder.typicode.com/posts') # as is the URL scheme | ||
~~~ | ||
|
||
Place your cursor on one of the lines and hit <kbd>ctrl+alt+r</kbd> (<kbd>ctrl+r</kbd> on macOS). Or, look for __Requester: Run Requests__ in the command palette <kbd>shift+cmd+p</kbd> and hit Enter. A response tab will appear, with a name like __GET: /albums__. | ||
|
||
Head to the response tab and check out the response. Hit <kbd>ctrl+alt+r</kbd> or <kbd>ctrl+r</kbd> (<kbd>ctrl+r</kbd> or <kbd>cmd+r</kbd> on macOS) to replay the request. You can edit the request, which is at the top of the file, before replaying it. | ||
|
||
Now, go back to the requester file and highlight all 5 lines, and once again execute the requests. Nice, huh? | ||
|
||
|
||
### Multiline Requests, Request Body, Query Params | ||
~~~py | ||
post('httpbin.org/post', | ||
json={'name': 'Jimbo', 'age': 35, 'married': False, 'hobbies': ['wiki', 'pedia']} | ||
) | ||
|
||
get('httpbin.org/get', | ||
params={'key1': 'value1', 'key2': 'value2'} | ||
) | ||
~~~ | ||
|
||
Body, Query Params, and Headers are passed to __requests__ as dictionaries. And for executing requests defined over multiple lines, you have two options: | ||
|
||
- fully highlight one or more requests and execute them | ||
- place your cursor on the __first line__ of a request and execute it | ||
|
||
Try it out. | ||
|
||
|
||
## Documentation | ||
Wanna see everything else Requester does? Detailed, [__fuzzy searchable documentation here__](http://requester.org). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## Why Requester? | ||
Requester combines features from applications like Postman, Paw, Insomnia and HTTPie with the elegance and power of Requests and rock-solid UX of Sublime Text. | ||
|
||
Requester leans on [Requests](http://docs.python-requests.org/en/master/user/quickstart/) as much as possible. This means Requester does most anything Requests does, which means it does most anything you need to explore, debug, and test a modern API. | ||
|
||
It also means Requester uses an extensively documented, battle-tested library famed for its beauty. If you don't know how to do something with Requester, there are thousands of blog posts, articles and answers on Stack Overflow that explain how to do it. | ||
|
||
Apart from being feature-rich, __Requester is built for speed and simplicity__. I was a Postman user before writing Requester, and I got tired of, for example, having to click in 4 places to add or change an env var. With Requester you might have to move your cursor up a few lines. | ||
|
||
Request navigation and history, which use Sublime Text's [blistering fast fuzzy match](https://www.reddit.com/r/programming/comments/4cfz8r/reverse_engineering_sublime_texts_fuzzy_match/), are especially powerful. Jump between requests and request groups in your requester file. Hop between open response tabs. Find the exact version of a request you executed a week ago. It's all lightning fast. | ||
|
||
The paid collaboration features of HTTP client apps, such as sharing and versioning, are not only free in Requester, they're better. Requester works with text files, and as good as the developers at Postman and Paw are, they don't beat GitHub at collaboration, and they don't beat Git at version control. | ||
|
||
Need to share requests with someone who doesn't use Requester? Exporting your requests to cURL or HTTPie takes a few seconds. Ditto with importing requests from cURL, which means it's trivial to grab AJAX requests sent by your browser and pull them into Requester. | ||
|
||
Requester is cross-platform and built for teams. If you debug web APIs for work or for fun, try it. __Try it even if you don't use Sublime Text__. You'll have to switch between two text editors, but you already have to switch between your editor and your HTTP client, and I'm betting you'll like Requester more. ✨✨ |
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