Skip to content

Commit 31a2211

Browse files
committed
Move target docs inline & update internal wiki links
1 parent 136abf0 commit 31a2211

File tree

2 files changed

+278
-11
lines changed

2 files changed

+278
-11
lines changed

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ httpsnippet example.json --target http --output ./snippets -x '{"autoHost": fals
8080
*Required*
8181
Type: `object`
8282

83-
Name of [conversion target](https://github.com/Mashape/httpsnippet/wiki/Targets)
83+
Name of [conversion target](TARGETS.md)
8484

8585
```js
8686
var HTTPSnippet = require('httpsnippet');
@@ -98,13 +98,13 @@ var snippet = new HTTPSnippet({
9898
*Required*
9999
Type: `string`
100100

101-
Name of [conversion target](https://github.com/Mashape/httpsnippet/wiki/Targets)
101+
Name of [conversion target](TARGETS.md)
102102

103103
#### options
104104

105105
Type: `object`
106106

107-
Target options, *see [wiki](https://github.com/Mashape/httpsnippet/wiki/Targets) for details*
107+
Target options, *see [target docs](https://github.com/httptoolkit/httpsnippet/blob/main/TARGETS.md) for details*
108108

109109
```js
110110
var HTTPSnippet = require('httpsnippet');
@@ -130,19 +130,19 @@ console.log(snippet.convert('node', {
130130
*Required*
131131
Type: `string`
132132

133-
Name of [conversion target](https://github.com/Mashape/httpsnippet/wiki/Targets)
133+
Name of [conversion target](TARGETS.md)
134134

135135
#### client
136136

137137
Type: `string`
138138

139-
Name of conversion target [client library](https://github.com/Mashape/httpsnippet/wiki/Targets)
139+
Name of conversion target [client library](TARGETS.md)
140140

141141
#### options
142142

143143
Type: `object`
144144

145-
Target options, *see [wiki](https://github.com/Mashape/httpsnippet/wiki/Targets) for details*
145+
Target options, *see [target docs](https://github.com/httptoolkit/httpsnippet/blob/main/TARGETS.md) for details*
146146

147147
```js
148148
var HTTPSnippet = require('httpsnippet');
@@ -167,7 +167,7 @@ console.log(snippet.convert('node', 'unirest'));
167167
*Required*
168168
Type: `object`
169169

170-
Representation of a [conversion target](https://github.com/Kong/httpsnippet/wiki/Creating-Targets). Can use this to use targets that are not officially supported.
170+
Representation of a [conversion target](https://github.com/httptoolkit/httpsnippet/blob/main/CONTRIBUTING.md#creating-new-conversion-targets). Can use this to use targets that are not officially supported.
171171

172172
```js
173173
const customLanguageTarget = require('httpsnippet-for-my-lang');
@@ -180,14 +180,14 @@ HTTPSnippet.addTarget(customLanguageTarget);
180180
*Required*
181181
Type: `string`
182182

183-
Name of [conversion target](https://github.com/Mashape/httpsnippet/wiki/Targets)
183+
Name of [conversion target](TARGETS.md)
184184

185185
### client
186186

187187
*Required*
188188
Type: `object`
189189

190-
Representation of a [conversion target client](https://github.com/Kong/httpsnippet/wiki/Creating-Targets). Can use this to use target clients that are not officially supported.
190+
Representation of a [conversion target client](https://github.com/httptoolkit/httpsnippet/blob/main/CONTRIBUTING.md#creating-new-conversion-targets). Can use this to use target clients that are not officially supported.
191191

192192
```js
193193
const customClient = require('httpsnippet-for-my-node-http-client');
@@ -198,7 +198,7 @@ HTTPSnippet.addTargetClient('node', customClient);
198198

199199
At the heart of this module is the [HAR Format](http://www.softwareishard.com/blog/har-12-spec/#request) as the HTTP request description format, please review some of the sample JSON HAR Request objects in [test fixtures](/test/fixtures/requests), or read the [HAR Docs](http://www.softwareishard.com/blog/har-12-spec/#request) for more details.
200200

201-
For detailed information on each target, please review the [wiki](https://github.com/Mashape/httpsnippet/wiki).
201+
For detailed information on each target, please review the [target docs](./TARGETS.md).
202202

203203
## Bugs and feature requests
204204

@@ -208,7 +208,7 @@ Have a bug or a feature request? Please first read the [issue guidelines](CONTRI
208208

209209
Please read through our [contributing guidelines](CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
210210

211-
For info on creating new conversion targets, please review this [guideline](https://github.com/Mashape/httpsnippet/wiki/Creating-Targets)
211+
For info on creating new conversion targets, please review this [guideline](https://github.com/httptoolkit/httpsnippet/blob/main/CONTRIBUTING.md#creating-new-conversion-targets)
212212

213213
Moreover, if your pull request contains JavaScript patches or features, you must include relevant unit tests.
214214

TARGETS.md

+267
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,267 @@
1+
# Targets
2+
3+
Currently the following output targets are supported:
4+
5+
## Go
6+
7+
### [Native](http://golang.org/pkg/net/http/#NewRequest)
8+
9+
> Golang HTTP client request
10+
11+
###### Options
12+
13+
| Option | Default | Description |
14+
| --------------- | ------- | ----------------------------------------------------- |
15+
| `checkErrors` | `false` | add error checking for request, response and body |
16+
| `printBody` | `true` | include code to print the body as a string |
17+
| `timeout` | `-1` | sets a request timeout in seconds (requires go 1.3+) |
18+
19+
----
20+
21+
## Java
22+
23+
### [Unirest](http://unirest.io/java.html)
24+
25+
> Lightweight HTTP Request Client Library
26+
27+
###### Options
28+
29+
| Option | Default | Description |
30+
| --------- | ------- | -------------------------------- |
31+
| `indent` | ` ` | line break & indent output value |
32+
33+
### [OkHttp](http://square.github.io/okhttp/)
34+
35+
> An HTTP Request Client Library
36+
37+
###### Options
38+
39+
| Option | Default | Description |
40+
| --------- | ------- | -------------------------------- |
41+
| `indent` | ` ` | line break & indent output value |
42+
43+
----
44+
45+
## JavaScript
46+
47+
### [jQuery.ajax](http://api.jquery.com/jquery.ajax/)
48+
49+
> Perform an asynchronous HTTP (Ajax) requests with jQuery
50+
51+
###### Options
52+
53+
| Option | Default | Description |
54+
| --------- | ------- | -------------------------------- |
55+
| `indent` | ` ` | line break & indent output value |
56+
57+
### [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest)
58+
59+
> W3C Standard API that provides scripted client functionality
60+
61+
###### Options
62+
63+
| Option | Default | Description |
64+
| --------- | ------- | -------------------------------- |
65+
| `cors` | `true` | use `xhr.withCredentials = true` |
66+
| `indent` | ` ` | line break & indent output value |
67+
68+
###### Options
69+
70+
----
71+
72+
## Node.js
73+
74+
### [Native](http://nodejs.org/api/http.html#http_http_request_options_callback)
75+
76+
> Node.js native HTTP interface
77+
78+
###### Options
79+
80+
| Option | Default | Description |
81+
| --------- | ------- | -------------------------------- |
82+
| `indent` | ` ` | line break & indent output value |
83+
84+
### [Request](https://github.com/request/request)
85+
86+
> Simplified HTTP request client
87+
88+
###### Options
89+
90+
| Option | Default | Description |
91+
| --------- | ------- | -------------------------------- |
92+
| `indent` | ` ` | line break & indent output value |
93+
94+
### [Unirest](http://unirest.io/nodejs.html)
95+
96+
> Lightweight HTTP Request Client Library
97+
98+
###### Options
99+
100+
| Option | Default | Description |
101+
| --------- | ------- | -------------------------------- |
102+
| `indent` | ` ` | line break & indent output value |
103+
104+
----
105+
106+
## Objective-C
107+
108+
### [NSURLSession](https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSession_class/index.html)
109+
110+
> Foundation's NSURLSession request
111+
112+
###### Options
113+
114+
| Option | Default | Description |
115+
| --------- | ------- | --------------------------------------------------------------- |
116+
| `indent` | ` ` | line break & indent output value |
117+
| `pretty` | `true` | indent extracted headers/parameters in `NSDictionary` literals |
118+
| `timeout` | `10` | NSURLRequest timeout |
119+
120+
----
121+
122+
## OCaml
123+
124+
### [CoHTTP](https://github.com/mirage/ocaml-cohttp)
125+
126+
> CoHTTP is a very lightweight HTTP server using Lwt or Async for OCaml
127+
128+
###### Options
129+
130+
| Option | Default | Description |
131+
| --------- | ------- | -------------------------------- |
132+
| `indent` | ` ` | line break & indent output value |
133+
134+
----
135+
136+
## PHP
137+
138+
### [ext-curl](http://php.net/manual/en/book.curl.php)
139+
140+
> PHP with ext-curl
141+
142+
###### Options
143+
144+
| Option | Default | Description |
145+
| --------------- | ------- | ----------------------------------------------- |
146+
| `closingTag` | `false` | add a closing tag `?>` |
147+
| `indent` | ` ` | line break & indent output value |
148+
| `maxRedirects` | `10` | value for `CURLOPT_MAXREDIRS` |
149+
| `namedErrors` | `false` | attempt to display curl error name instead of # |
150+
| `noTags` | `false` | do NOT output start and end tags: `<?php`, `?>` |
151+
| `shortTags` | `false` | use short opening tag: `<?` |
152+
| `timeout` | `30` | value for `CURLOPT_TIMEOUT` |
153+
154+
### [pecl/http v1](http://php.net/manual/en/book.http.php)
155+
156+
> PHP with pecl/http v1
157+
158+
###### Options
159+
160+
| Option | Default | Description |
161+
| --------------- | ------- | ----------------------------------------------- |
162+
| `closingTag` | `false` | add a closing tag `?>` |
163+
| `indent` | ` ` | line break & indent output value |
164+
| `noTags` | `false` | do NOT output start and end tags: `<?php`, `?>` |
165+
| `shortTags` | `false` | use short opening tag: `<?` |
166+
167+
### [pecl/http v2](http://devel-m6w6.rhcloud.com/mdref/http)
168+
169+
> PHP with pecl/http v2
170+
171+
###### Options
172+
173+
| Option | Default | Description |
174+
| --------------- | ------- | ----------------------------------------------- |
175+
| `closingTag` | `false` | add a closing tag `?>` |
176+
| `indent` | ` ` | line break & indent output value |
177+
| `noTags` | `false` | do NOT output start and end tags: `<?php`, `?>` |
178+
| `shortTags` | `false` | use short opening tag: `<?` |
179+
180+
----
181+
182+
## Python
183+
184+
### [Python 3](https://docs.python.org/3/library/http.client.html)
185+
186+
> Python3 HTTP Client
187+
188+
### [Requests](http://docs.python-requests.org/en/latest/api/#requests.request)
189+
190+
Requests HTTP library
191+
192+
----
193+
194+
## Ruby
195+
196+
### [Native](http://ruby-doc.org/stdlib-2.2.1/libdoc/net/http/rdoc/Net/HTTP.html)
197+
198+
> Ruby HTTP client
199+
200+
----
201+
202+
## Shell
203+
204+
### [cURL](http://curl.haxx.se/)
205+
206+
> cURL is a command line tool and library for transferring data with URL syntax
207+
208+
| Option | Default | Description |
209+
| -------- | ------- | ------------------------------------------------------------------------ |
210+
| `indent` | ` ` | line break & indent output value, set to `false` to disable line breaks |
211+
| `short` | `false` | use short form of cURL CLI options |
212+
213+
### [HTTPie](http://httpie.org)
214+
215+
> a CLI, cURL-like tool for humans
216+
217+
| Option | Default | Description |
218+
| ------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
219+
| `body` | `false` | only the response body is printed |
220+
| `cert` | `false` | use a client side certificate *(see [httpie docs](https://github.com/jakubroztocil/httpie#client-side-ssl-certificate))* |
221+
| `headers` | `false` | only the response headers are printed |
222+
| `indent` | ` ` | line break & indent output value, set to `false` to disable line breaks |
223+
| `pretty` | `false` | syntax highlighting *(see [httpie docs](https://github.com/jakubroztocil/httpie#colors-and-formatting))* |
224+
| `print` | `false` | selects parts of the HTTP exchange, e.g. `--print=Hh` *(see [httpie docs](https://github.com/jakubroztocil/httpie#output-options))* |
225+
| `queryParams` | `false` | use query params as CLI parameters *otherwise, query string is added to URL* |
226+
| `short` | `false` | use short form of cURL CLI options |
227+
| `style` | `false` | syntax highlighting *(see [httpie docs](https://github.com/jakubroztocil/httpie#colors-and-formatting))* |
228+
| `timeout` | `false` | overwrite the default *30s* timeout |
229+
| `verbose` | `false` | print the whole HTTP exchange (request and response) |
230+
| `verify` | `false` | server SSL certificate verification *(see [httpie docs](https://github.com/jakubroztocil/httpie#server-ssl-certificate-verification))* |
231+
232+
### [Wget](https://www.gnu.org/software/wget/)
233+
234+
> a free software package for retrieving files using HTTP, HTTPS
235+
236+
| Option | Default | Description |
237+
| --------- | ------- | ------------------------------------------------------------------------ |
238+
| `indent` | ` ` | line break & indent output value, set to `false` to disable line breaks |
239+
| `short` | `false` | use short form of cURL CLI options |
240+
| `verbose` | `false` | by default, `--quiet` is always used, unless `verbose` is set to `true` |
241+
242+
----
243+
244+
## Swift
245+
246+
### [NSURLSession](https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSession_class/index.html)
247+
248+
> Foundation's NSURLSession request
249+
250+
| Option | Default | Description |
251+
| --------- | ------- | --------------------------------------------------------------- |
252+
| `indent` | ` ` | line break & indent output value |
253+
| `pretty` | `true` | indent extracted headers/parameters in `NSDictionary` literals |
254+
| `timeout` | `10` | NSURLRequest timeout |
255+
256+
257+
## C#
258+
259+
### [RestSharp](http://restsharp.org/)
260+
261+
> Simple REST and HTTP API Client for .NET
262+
263+
## C
264+
265+
### [LibCurl](http://curl.haxx.se/libcurl/)
266+
267+
> A easy-to-use client-side URL transfer library

0 commit comments

Comments
 (0)