Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-dill committed May 18, 2020
1 parent 90422c3 commit 66fba09
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 38 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

**Roblox Requests** brings user-friendly HTTP to Roblox with no need for the manual labor of HttpService.

---

With Requests you can send robust, human-readable HTTP requests without ever having to deal with the underlying HttpService.
No more manual query strings or encoding POST data.

The Power of Roblox Requests:
#### The Power of Roblox Requests:

```lua
local r = http.get("https://api.github.com/orgs/Roblox/repos")
Expand All @@ -29,7 +27,7 @@ print(r.headers["x-ratelimit-remaining"])

Roblox Requests will bring simple support for all internet resources to your game.

## Roblox Requests Features
## Features

- Sessions with Cookie Persistence
- Default Headers, URL prefixes
Expand All @@ -41,4 +39,6 @@ Roblox Requests will bring simple support for all internet resources to your gam
- Global/Per-Session Ratelimiting


Roblox Requests was inspired by the well known [Python Requests](https://2.python-requests.org/en/master/) library.

[In this documentation](https://jpatrickdill.github.io/roblox-requests/guide/installation/) you'll find step-by-step instructions to get the most out of Roblox Requests.
26 changes: 0 additions & 26 deletions docs/changes.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/guide/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ print(r.headers["Last-Modified"])
-- Wed, 08 Oct 2014 23:28:44 GMT
```

This dictionary, however, is special. HTTP headers are case-insensitive, so you can access them however you like:
HTTP headers are case-insensitive, so you can access them however you like:

```lua
print(r.headers["Last-Modified"])
Expand Down
Binary file added docs/img/with.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/without.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

**Roblox Requests** brings user-friendly HTTP to Roblox with no need for the manual labor of HttpService.

---

With Requests you can send robust, human-readable HTTP requests without ever having to deal with the underlying HttpService.
No more manual query strings or encoding POST data.

The Power of Roblox Requests:
#### The Power of Roblox Requests:

```lua
local r = http.get("https://api.github.com/orgs/Roblox/repos")
Expand All @@ -29,7 +27,7 @@ print(r.headers["x-ratelimit-remaining"])

Roblox Requests will bring simple support for all internet resources to your game.

## Roblox Requests Features
## Features

- Sessions with Cookie Persistence
- Default Headers, URL prefixes
Expand Down
8 changes: 8 additions & 0 deletions example.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
local HttpService = game:GetService("HttpService")

local body = HttpService:JSONEncode({cookies = "milk"})
local r = HttpService:RequestAsync({Url = "https://httpbin.org/put", Method="PUT", Body=body})

if r.Success then
data = HttpService:JSONDecode(r.Body)
end
2 changes: 1 addition & 1 deletion http/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ local RateLimiter = require(Src.ratelimit)

local http = {}

http.VERSION = "0.2.0"
http.VERSION = "0.2.1"

http.Request = Request.new
http.Session = Session.new
Expand Down
3 changes: 1 addition & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ plugins:

nav:
- Home: index.md
- Release Notes: changes.md
- Guide:
- Installation: guide/installation.md
- Quickstart: guide/quickstart.md
Expand All @@ -27,4 +26,4 @@ nav:


extra:
version: 0.2.0
version: 0.2.1

0 comments on commit 66fba09

Please sign in to comment.