Skip to content

Commit

Permalink
Made README much smaller (and hopefully less daunting)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebebak committed Oct 14, 2017
1 parent 1aa1000 commit f03f8ec
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 730 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To run `core` tests, execute `python -m unittest tests.core -v` from the root of

To run the integration tests, install __UnitTesting__ via Package Control. Read more about [UnitTesting](https://github.com/randy3k/UnitTesting-example). Also, make sure you've cloned the Requester repo into your __Packages__ directory.

Run integration tests before committing changes. Look for __UnitTesting__ in the command palette, hit enter, and type `Requester`. Or, if you've created a project for Requester, run __UnitTesting: Test Current Project__.
Run integration tests before committing changes. Look for __UnitTesting__ in the command palette, hit Enter, and type `Requester`. Or, if you've created a project for Requester, run __UnitTesting: Test Current Project__.


### Docs
Expand Down
720 changes: 25 additions & 695 deletions README.md

Large diffs are not rendered by default.

24 changes: 3 additions & 21 deletions docs/_content/body.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ get('httpbin.org/cookies', cookies={'url': first_response.json()['url']})

## Navigation and History
UX is sort of an obsession for me, and it's sacred in Requester. The biggest UX difference between Requester and other HTTP clients is the ease with which you can find, modify and execute your requests — the ones in your requester file, and the ones in you request history.
UX is central to Requester's design. The biggest UX difference between Requester and other HTTP clients is the ease with which you can find, modify and execute your requests — the ones in your requester file, and the ones in your request history.


### Requester File Navigation (.pyr extension)
Expand Down Expand Up @@ -306,7 +306,7 @@ Notice the key bindings for __prev/next request__ in response tabs? Give them a
These commands let you page through past requests one at a time, and can be used from any response tab. __Combine them with fuzzy search for request searching nirvana__.

Imagine you want to find a GET request you ran when you were working with the Twitter API over the weekend. You open search with __Requester: Request History__ and type _twitter_, and see a bunch of requests from around 3 days ago. You're not sure which is the right one, so you hit enter to get a better look.
Imagine you want to find a GET request you ran when you were working with the Twitter API over the weekend. You open search with __Requester: Request History__ and type _twitter_, and see a bunch of requests from around 3 days ago. You're not sure which is the right one, so you hit Enter to get a better look.

From here, you begin to page back, past a few 40Xs, some POSTs, then boom, the elusive 200 GET is right in front of you. You replay it, and now it's back on top of your request history. Next time you want it it'll take 1 second to find instead of 10.

Expand Down Expand Up @@ -665,23 +665,5 @@ Requester's modifiable settings, and their default values. You can override any

## Inspired By
- [Requests](http://docs.python-requests.org/en/master/) — Requester sends all its requests using this amazing library.
- [HTTPie](https://github.com/jakubroztocil/httpie) — A truly "Pythonic" tool. Its focus on intuitiveness and ergonomics inspired many of Requester's features, including its [docs site](http://requester.org).
- [HTTPie](https://github.com/jakubroztocil/httpie) — A truly Pythonic tool. Its focus on intuitiveness and ergonomics inspired many of Requester's features, including its [docs site](http://requester.org).
- [Postman](https://www.getpostman.com/) — A strong influence on much of Requester's "managed" UI.


## 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 are especially powerful. Finding a request you executed a week ago, editing it and executing it is 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 all of your requests to cURL or HTTPie takes a few seconds.

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. Sublime Text running Requester probably has a smaller footprint than your HTTP client, and it's probably a lot easier to use. ✨✨
17 changes: 8 additions & 9 deletions docs/_content/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,23 @@ __Requester__ is a modern, team-oriented HTTP client for Sublime Text 3 that com
+ Forms and file uploads, Wget-style downloads
+ HTTPS, proxies, redirects, and more
- Intuitive, modern UX
+ Define [__environment variables__](#environment-variables) with regular Python code
+ Execute requests and display responses in parallel, [__or chain requests__](#chaining-by-reference)
+ Define [__environment variables__](http://requester.org/#environment-variables) with regular Python code
+ Execute requests and display responses in parallel, [__or chain requests__](http://requester.org/#chaining-by-reference)
+ Edit and replay requests from individual response tabs, page through past requests
* [__Explore hyperlinked APIs__](#explore-hyperlinked-apis-hateoas) from response tabs
+ Fuzzy searchable [__request collections and request history__](#navigation-and-history)
* [__Explore hyperlinked APIs__](http://requester.org/#explore-hyperlinked-apis-hateoas) from response tabs
+ Fuzzy searchable [__request collections and request history__](http://requester.org/#navigation-and-history)
+ Formatted, colorized output with automatic syntax highlighting
+ Clear error handling and error messages
+ [__Full GraphQL support__](#graphql)
+ [__Fuzzy searchable documentation__](http://requester.org#documentation)
+ [__Full GraphQL support__](http://requester.org/#graphql)
- Built for teams
+ Version and share requests however you want (Git, GitHub, etc)
+ Export requests to cURL or HTTPie, import requests from cURL
+ Lightweight, integrated test runner with support for JSON Schema
* [__Export Requester tests to runnable test script__](#export-tests-to-runnable-script)
* [__Export Requester tests to runnable test script__](http://requester.org/#export-tests-to-runnable-script)
+ [AB-style](https://httpd.apache.org/docs/2.4/programs/ab.html) benchmarking tool
+ Runs on Linux, Windows and macOS/OS X
- [__Highly extensible__](#import-any-python-package-with-requester)
- [__Highly extensible__](http://requester.org/#import-any-python-package-with-requester)

---

If you're looking for an HTTP client you should try Requester __even if you've never used Sublime Text__. [Here's why](#why-requester).
If you're looking for an HTTP client you should try Requester __even if you've never used Sublime Text__.
49 changes: 49 additions & 0 deletions docs/_content/intro.md
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).
1 change: 0 additions & 1 deletion docs/_content/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@
- [Settings](#settings)
- [Contributing and Tests](#contributing-and-tests)
- [Inspired By](#inspired-by)
- [Why Requester?](#why-requester)
16 changes: 16 additions & 0 deletions docs/_content/why_requester.md
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. ✨✨
3 changes: 1 addition & 2 deletions docs/_hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
# the -e flag in the shebang line ensures that this hook exits if any of its commands exits with a non-zero exit status

python docs/toc.py docs/_content/body.md > docs/_content/toc.md
BASE='docs/_content' && python docs/build.py $BASE/header.md $BASE/features.md $BASE/toc.md $BASE/body.md $BASE/youtube.md > README.md
BASE='docs/_content' && python docs/build.py $BASE/header.md $BASE/features.md $BASE/intro.md $BASE/why_requester.md $BASE/youtube.md > README.md

# the -u flag updates and removes index entries, but adds nothing
git add docs/_content/toc.md
git add README.md

Expand Down
2 changes: 2 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ <h1 id="documentation">Documentation</h1>
<div id="content">
{% capture body %}{% include_relative _content/body.md %}{% endcapture %}
{{ body | markdownify }}
{% capture why_requester %}{% include_relative _content/why_requester.md %}{% endcapture %}
{{ why_requester | markdownify }}
</div>

</div>
Expand Down
2 changes: 1 addition & 1 deletion messages/2.15.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Requester's on fire! Request history has been totally revamped for this version, combining fuzzy search with paging for request history nirvana.

## Request History
If you run __Requester: Request History__ from the command palette (add this to your key bindings, the command is "requester_history"), you get the usual fuzzy searchable list of requests. But now, if you select one of these requests and hit enter, Requester doesn't execute the request.
If you run __Requester: Request History__ from the command palette (add this to your key bindings, the command is "requester_history"), you get the usual fuzzy searchable list of requests. But now, if you select one of these requests and hit Enter, Requester doesn't execute the request.

Instead, it "stages" the request into a "request history" tab, from which you can look at the request and edit it before you execute it. And if you press `ctrl+alt+ ←/→`, you can page between requests that were executed before and after this historical request.

Expand Down

0 comments on commit f03f8ec

Please sign in to comment.