Skip to content

Commit 8a9204b

Browse files
committed
Update README.md
1 parent 9c294c9 commit 8a9204b

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,36 @@ Options:
6464

6565
process single file:
6666

67+
###### my-api-endpoint.json
68+
69+
```json
70+
{
71+
"method": "POST",
72+
"url": "http://mockbin.com/request",
73+
"httpVersion": "HTTP/1.1",
74+
"queryString": [
75+
{ "name": "foo", "value": "bar" },
76+
{ "name": "foo", "value": "baz" },
77+
{ "name": "baz", "value": "abc" }
78+
],
79+
"headers": [
80+
{ "name": "Accept", "value": "text/plain" },
81+
{ "name": "Content-Type", "value": "application/json" },
82+
{ "name": "X-Pretty-Print", "value": "2" }
83+
],
84+
"cookies": [
85+
{ "name": "foo", "value": "bar", "path": "/", "domain": "www.mockbin.com", "expires": "2015-02-11T04:28:14.821Z", "httpOnly": false, "secure": false },
86+
{ "name": "bar", "value": "baz", "path": "/", "domain": "www.mockbin.com", "expires": "2015-02-11T04:28:14.821Z", "httpOnly": false, "secure": false }
87+
],
88+
"headersSize": 44,
89+
"bodySize": 14,
90+
"postData": {
91+
"size": 14,
92+
"mimeType": "application/json",
93+
"text": "{\"foo\": \"bar\"}"
94+
}
95+
}
96+
```
6797
```shell
6898
httpsnippet my-api-endpoint.json --langauge php --output ./snippets
6999
```
@@ -104,7 +134,7 @@ var httpsnippet = require('httpsnippet');
104134

105135
var snippet = new httpsnippet({
106136
method: 'GET',
107-
url: 'http://httpconsole.com/echo'
137+
url: 'http://mockbin.com/request'
108138
});
109139

110140
// generate cURL output

0 commit comments

Comments
 (0)