Initial impl
This commit is contained in:
commit
4b729c5d32
133 files changed
+20475
No files matched your search
+8
@@ -0,0 +1,8 @@
|
||||
curl 'https://api.github.com/repos/rust-lang/rust/issues?state=open&per_page=5' \
|
||||
-H 'accept: application/vnd.github+json' \
|
||||
-H 'accept-language: en-US,en;q=0.9,sv;q=0.8' \
|
||||
-H 'cache-control: no-cache' \
|
||||
-H 'origin: https://github.com' \
|
||||
-H 'priority: u=1, i' \
|
||||
-H 'sec-fetch-mode: cors' \
|
||||
-H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36'
|
||||
@@ -0,0 +1,5 @@
|
||||
curl 'https://example.com/api/graphql' \
|
||||
-H 'accept: */*' \
|
||||
-H 'content-type: application/json' \
|
||||
-b 'session=abc123; theme=dark' \
|
||||
--data-raw $'{"query":"query { me { name } }","note":"it\'s here\\nnext line"}'
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
curl ^"https://example.com/search?q=a^%20b^" ^
|
||||
-H ^"accept: text/html^" ^
|
||||
--compressed
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
curl ^"https://example.com/api/items?page=2^&size=10^" ^
|
||||
-H ^"accept: application/json^" ^
|
||||
-H ^"content-type: application/json^" ^
|
||||
-H ^"user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36^" ^
|
||||
--data-raw ^"^{^\^"name^\^":^\^"Widget 50^%^\^",^\^"price^\^":9.5^}^"
|
||||
+1
@@ -0,0 +1 @@
|
||||
curl 'https://httpbin.org/post' -X POST -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Origin: https://httpbin.org' --data-raw 'a=1&b=two%20words'
|
||||
+1
@@ -0,0 +1 @@
|
||||
curl 'https://developer.mozilla.org/api/v1/whoami' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br, zstd' -H 'Referer: https://developer.mozilla.org/en-US/' -H 'Connection: keep-alive' -H 'Sec-Fetch-Mode: cors'
|
||||
+1
@@ -0,0 +1 @@
|
||||
curl.exe "https://httpbin.org/anything" -X PUT -H "Content-Type: application/json" --data-raw "{""ok"":true}"
|
||||
@@ -0,0 +1 @@
|
||||
curl -sSLk -u admin:s3cret -XDELETE https://localhost:8443/api/users/42 --max-time 10
|
||||
@@ -0,0 +1,3 @@
|
||||
curl -X PATCH https://api.example.com/users/1 \
|
||||
-H "Content-Type: application/json" \
|
||||
--data-binary @payloads/patch.json
|
||||
@@ -0,0 +1 @@
|
||||
curl -G https://api.example.com/search --data-urlencode 'q=rust lang' -d page=2 -A 'reqlite-test/1.0'
|
||||
+1
@@ -0,0 +1 @@
|
||||
curl -I --http2 https://example.com/
|
||||
+1
@@ -0,0 +1 @@
|
||||
curl --json '{"name":"Ada"}' https://api.example.com/users
|
||||
+1
@@ -0,0 +1 @@
|
||||
curl -F 'title=Holiday photo' -F 'file=@./photos/beach.jpg;type=image/jpeg' -F 'meta=<./meta.json' https://upload.example.com/v1/photos
|
||||
+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
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "3b0f6f2e-2222-4c1d-8e9a-77a1d0c0ab12",
|
||||
"name": "Shop dev",
|
||||
"values": [
|
||||
{ "key": "baseUrl", "value": "http://localhost:8080/api", "type": "default", "enabled": true },
|
||||
{ "key": "token", "value": "dev-token-123", "type": "secret", "enabled": true },
|
||||
{ "key": "adminPass", "value": "hunter2", "type": "secret", "enabled": true },
|
||||
{ "key": "old", "value": "x", "type": "default", "enabled": false }
|
||||
],
|
||||
"_postman_variable_scope": "environment"
|
||||
}
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
{
|
||||
"info": {
|
||||
"_postman_id": "8f1c2b6e-1111-4a3b-9c55-0d6f2a7b9e01",
|
||||
"name": "Shop API",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [{ "key": "token", "value": "{{token}}", "type": "string" }]
|
||||
},
|
||||
"event": [
|
||||
{ "listen": "prerequest", "script": { "type": "text/javascript", "exec": [""] } }
|
||||
],
|
||||
"variable": [
|
||||
{ "key": "baseUrl", "value": "https://shop.example.com/api" },
|
||||
{ "key": "pageSize", "value": 20 }
|
||||
],
|
||||
"item": [
|
||||
{
|
||||
"name": "Health",
|
||||
"request": {
|
||||
"auth": { "type": "noauth" },
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"url": { "raw": "{{baseUrl}}/health", "host": ["{{baseUrl}}"], "path": ["health"] }
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Products",
|
||||
"item": [
|
||||
{
|
||||
"name": "List products",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{ "key": "Accept", "value": "application/json" },
|
||||
{ "key": "X-Debug", "value": "1", "disabled": true }
|
||||
],
|
||||
"url": {
|
||||
"raw": "{{baseUrl}}/products?limit={{pageSize}}&sort=name",
|
||||
"host": ["{{baseUrl}}"],
|
||||
"path": ["products"],
|
||||
"query": [
|
||||
{ "key": "limit", "value": "{{pageSize}}" },
|
||||
{ "key": "sort", "value": "name" }
|
||||
]
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": { "exec": ["pm.test(\"ok\", () => pm.response.to.have.status(200));"], "type": "text/javascript" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Create product",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\r\n \"name\": \"Widget\",\r\n \"price\": 9.5\r\n}",
|
||||
"options": { "raw": { "language": "json" } }
|
||||
},
|
||||
"url": "{{baseUrl}}/products"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Upload image",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "formdata",
|
||||
"formdata": [
|
||||
{ "key": "caption", "value": "Front view", "type": "text" },
|
||||
{ "key": "image", "type": "file", "src": "/home/me/widget.png" },
|
||||
{ "key": "draft", "value": "true", "type": "text", "disabled": true }
|
||||
]
|
||||
},
|
||||
"url": "{{baseUrl}}/products/1/image"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Admin",
|
||||
"auth": {
|
||||
"type": "basic",
|
||||
"basic": [
|
||||
{ "key": "password", "value": "{{adminPass}}", "type": "string" },
|
||||
{ "key": "username", "value": "admin", "type": "string" }
|
||||
]
|
||||
},
|
||||
"item": [
|
||||
{
|
||||
"name": "Delete product",
|
||||
"request": { "method": "DELETE", "header": [], "url": "{{baseUrl}}/products/1" }
|
||||
},
|
||||
{
|
||||
"name": "Search (GraphQL)",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "graphql",
|
||||
"graphql": { "query": "query { products { id name } }", "variables": "{\"first\": 5}" }
|
||||
},
|
||||
"url": "{{baseUrl}}/graphql"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Auth",
|
||||
"item": [
|
||||
{
|
||||
"name": "Token",
|
||||
"request": {
|
||||
"auth": { "type": "noauth" },
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "urlencoded",
|
||||
"urlencoded": [
|
||||
{ "key": "grant_type", "value": "client_credentials" },
|
||||
{ "key": "client_id", "value": "{{clientId}}" },
|
||||
{ "key": "scope", "value": "shop", "disabled": true }
|
||||
]
|
||||
},
|
||||
"url": "https://auth.example.com/oauth/token"
|
||||
},
|
||||
"event": [
|
||||
{ "listen": "test", "script": { "exec": ["pm.environment.set('token', pm.response.json().access_token);"] } }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "API key ping",
|
||||
"request": {
|
||||
"auth": {
|
||||
"type": "apikey",
|
||||
"apikey": [
|
||||
{ "key": "key", "value": "X-Api-Key" },
|
||||
{ "key": "value", "value": "{{apiKey}}" },
|
||||
{ "key": "in", "value": "header" }
|
||||
]
|
||||
},
|
||||
"method": "GET",
|
||||
"url": "{{baseUrl}}/ping"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Digest thing",
|
||||
"request": {
|
||||
"auth": { "type": "digest", "digest": [] },
|
||||
"method": "GET",
|
||||
"url": "{{baseUrl}}/digest"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user