Initial impl
This commit is contained in:
commit
4b729c5d32
133 files changed
+20475
No files matched your search
+1
@@ -0,0 +1 @@
|
||||
GET https://httpbin.org/get
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
### List users
|
||||
GET {{base_url}}/users?limit=20
|
||||
Accept: application/json
|
||||
|
||||
### Create user
|
||||
# @name create-user
|
||||
# @timeout 30
|
||||
POST {{base_url}}/users
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{token}}
|
||||
|
||||
{ "name": "Ada" }
|
||||
|
||||
### Upload avatar
|
||||
POST {{base_url}}/users/1/avatar
|
||||
Content-Type: application/octet-stream
|
||||
|
||||
< ./payloads/avatar.png
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
@host = localhost:8080
|
||||
@base = http://{{host}}/api
|
||||
|
||||
# Comments before the first request
|
||||
// and in both styles
|
||||
|
||||
GET {{base}}/health
|
||||
@@ -0,0 +1,6 @@
|
||||
### Search with params on separate lines
|
||||
GET https://api.example.com/search
|
||||
?q=rust
|
||||
&page=2
|
||||
&per_page=50
|
||||
Accept: application/json
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
# A file-level comment
|
||||
|
||||
### Get thing
|
||||
// A comment before the request line
|
||||
# @name get-thing
|
||||
GET https://api.example.com/things/1
|
||||
# X-Debug: true
|
||||
Accept: application/json
|
||||
// a stray comment among headers
|
||||
|
||||
###
|
||||
|
||||
# Unnamed request after a bare separator
|
||||
DELETE https://api.example.com/things/1
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
### Upload with form fields
|
||||
POST https://api.example.com/upload
|
||||
Content-Type: multipart/form-data; boundary=WebAppBoundary
|
||||
|
||||
--WebAppBoundary
|
||||
Content-Disposition: form-data; name="description"
|
||||
|
||||
A picture of a cat
|
||||
--WebAppBoundary
|
||||
Content-Disposition: form-data; name="file"; filename="cat.png"
|
||||
Content-Type: image/png
|
||||
|
||||
< ./cat.png
|
||||
--WebAppBoundary--
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
### Login
|
||||
POST {{base_url}}/login
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"user": "ada",
|
||||
"password": "{{password}}"
|
||||
}
|
||||
|
||||
> {%
|
||||
client.global.set("token", response.body.token);
|
||||
client.test("ok", function() {
|
||||
client.assert(response.status === 200);
|
||||
});
|
||||
%}
|
||||
|
||||
### Me
|
||||
GET {{base_url}}/me
|
||||
Authorization: Bearer {{token}}
|
||||
|
||||
> ./scripts/check-me.js
|
||||
|
||||
<> ./responses/me-2024-01-01.json
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
### HTTP/2
|
||||
GET https://nghttp2.org/httpbin/get HTTP/2
|
||||
|
||||
### HTTP/1.1 explicit
|
||||
GET https://example.com/ HTTP/1.1
|
||||
Host: example.com
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
https://example.com/no-method
|
||||
|
||||
###
|
||||
|
||||
example.com/no-scheme
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
### All the directives
|
||||
# @name everything
|
||||
# @no-redirect
|
||||
# @no-cookie-jar
|
||||
# @no-log
|
||||
# @timeout 600
|
||||
# @connection-timeout 2 s
|
||||
# @some-future-directive with a value
|
||||
GET https://example.com/redirect
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
### Windows line endings
|
||||
POST https://example.com/crlf
|
||||
Content-Type: text/plain
|
||||
|
||||
line one
|
||||
line two
|
||||
|
||||
### Second
|
||||
GET https://example.com/
|
||||
@@ -0,0 +1,5 @@
|
||||
### No trailing newline
|
||||
POST https://example.com/x
|
||||
Content-Type: application/json
|
||||
|
||||
{"a": 1}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
### GraphQL query
|
||||
POST https://api.github.com/graphql
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{github_token}}
|
||||
|
||||
{
|
||||
"query": "query { viewer { login } }"
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
### OAuth token
|
||||
POST https://auth.example.com/oauth/token
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
|
||||
grant_type=client_credentials&
|
||||
client_id={{client_id}}&
|
||||
client_secret={{client_secret}}
|
||||
@@ -0,0 +1,5 @@
|
||||
### Body from a template file
|
||||
PUT {{base_url}}/orders/42
|
||||
Content-Type: application/json
|
||||
|
||||
<@ ./payloads/order.json
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
### WebDAV
|
||||
PROPFIND https://dav.example.com/files/
|
||||
Depth: 1
|
||||
|
||||
### Patch
|
||||
PATCH https://api.example.com/users/1
|
||||
Content-Type: application/merge-patch+json
|
||||
|
||||
{"name":"Grace"}
|
||||
|
||||
### Options
|
||||
OPTIONS https://api.example.com/
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
### Lots of space around
|
||||
|
||||
|
||||
GET https://example.com/a
|
||||
|
||||
|
||||
|
||||
### Body with blank lines inside
|
||||
POST https://example.com/b
|
||||
Content-Type: text/plain
|
||||
|
||||
first paragraph
|
||||
|
||||
second paragraph
|
||||
|
||||
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
@baseUrl = https://example.com/api
|
||||
|
||||
# @name login
|
||||
POST {{baseUrl}}/api/login HTTP/1.1
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
|
||||
name=foo&password=bar
|
||||
|
||||
###
|
||||
|
||||
@authToken = {{login.response.headers.X-AuthToken}}
|
||||
|
||||
# @name createComment
|
||||
POST {{baseUrl}}/comments HTTP/1.1
|
||||
Authorization: {{authToken}}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"content": "fake content"
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# This file has no requests yet.
|
||||
// Just notes.
|
||||
@base = http://localhost
|
||||
@@ -0,0 +1,7 @@
|
||||
### Body lines starting with # or // are body, not comments
|
||||
POST https://example.com/markdown
|
||||
Content-Type: text/markdown
|
||||
|
||||
# Heading
|
||||
// not a comment
|
||||
Some text
|
||||
Reference in new issue
Block a user