sync-request-curl
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"files": [ | ||
@@ -10,0 +10,0 @@ "dist" |
@@ -37,2 +37,4 @@ # sync-request-curl | ||
- [4. Windows/MacOS](#4-windowsmacos) | ||
- [4.1. Windows](#41-windows) | ||
- [4.2. MacOS](#42-macos) | ||
- [5. Caveats](#5-caveats) | ||
@@ -57,4 +59,2 @@ | ||
<br/> | ||
`GET` request without options | ||
@@ -114,5 +114,5 @@ | ||
See [sync-request](https://www.npmjs.com/package/sync-request) for the original documentation. | ||
See [sync-request](https://www.npmjs.com/package/sync-request) for the original documentation. All Libcurl Errors will contain a non-zero integer code that can be looked up [here](https://curl.se/libcurl/c/libcurl-errors.html). | ||
Please note that this library only supports a subset of the original features, which are summarised below. | ||
Please note that this library only supports a subset of the original features which are summarised below. | ||
@@ -122,11 +122,9 @@ ### 2.1. Method | ||
HTTP method (of type `HttpVerb`) | ||
- e.g. `PUT`/`POST`/`GET`/`DELETE`. | ||
e.g. `PUT`/`POST`/`GET`/`DELETE`. | ||
### 2.2. URL | ||
URL as a string | ||
- e.g. https://toohak.fly.dev | ||
e.g. https://toohak.fly.dev | ||
### 2.3. Options | ||
@@ -151,3 +149,3 @@ | ||
{ | ||
message: 'Hi' | ||
message: 'Hi!' | ||
} | ||
@@ -166,3 +164,3 @@ </pre> | ||
{ | ||
token: 'abc' | ||
token: 'abcde' | ||
} | ||
@@ -179,4 +177,4 @@ </pre> | ||
<pre>{ | ||
email: 'ab@c.com', | ||
password: 'comp1531' | ||
name: 'Tam', | ||
course: 1531 | ||
}</pre> | ||
@@ -192,5 +190,6 @@ </td> | ||
<td> | ||
<pre>JSON.stringify({ | ||
email: 'ab@c.com', | ||
password: 'comp1531' | ||
<pre> | ||
JSON.stringify({ | ||
name: 'Tam', | ||
course: 1531 | ||
}) </pre></td> | ||
@@ -245,5 +244,10 @@ <td><code>undefined</code></td> | ||
<td> | ||
<pre>(c, o) => { | ||
c.setOpt(o.MAXREDIRS, 3); | ||
};</pre> | ||
<pre> | ||
(curl, opt) => { | ||
curl.setOpt( | ||
opt.MAXREDIRS, | ||
3 | ||
); | ||
}; | ||
</pre> | ||
</td> | ||
@@ -250,0 +254,0 @@ <td><code>undefined</code></td> |
40217
330