@ossiana/node-libcurl
Advanced tools
Comparing version 1.3.0 to 1.3.4
{ | ||
"name": "@ossiana/node-libcurl", | ||
"version": "1.3.0", | ||
"version": "1.3.4", | ||
"author": { | ||
@@ -31,6 +31,6 @@ "name": "Ossian" | ||
"optionalDependencies": { | ||
"@ossiana/node-libcurl-darwin-x64": "1.3.0", | ||
"@ossiana/node-libcurl-darwin-arm64": "1.3.0", | ||
"@ossiana/node-libcurl-linux-x64-gnu": "1.3.0", | ||
"@ossiana/node-libcurl-win32-x64-msvc": "1.3.0" | ||
"@ossiana/node-libcurl-darwin-x64": "1.3.4", | ||
"@ossiana/node-libcurl-darwin-arm64": "1.3.4", | ||
"@ossiana/node-libcurl-linux-x64-gnu": "1.3.4", | ||
"@ossiana/node-libcurl-win32-x64-msvc": "1.3.4" | ||
}, | ||
@@ -37,0 +37,0 @@ "main": "./dist/index.js", |
@@ -27,6 +27,6 @@ # node-libcurl | ||
| __MacOS (x86_64)__ | __Yes__ | | ||
| __MacOS (arm64)__ | __No__ | | ||
| __MacOS (arm64)__ | __Yes__ | | ||
------------ | ||
## How to build | ||
## How to Install | ||
> npm i -g @ossiana/node-libcurl | ||
@@ -39,3 +39,3 @@ ------------ | ||
### import | ||
### import as ES Module | ||
```javascript | ||
@@ -45,2 +45,7 @@ import { LibCurl, fetch, requests } from '@ossiana/node-libcurl' | ||
### import as CommonJS Module | ||
```javascript | ||
const { LibCurl, fetch, requests } = require('@ossiana/node-libcurl') | ||
``` | ||
### browser fetch style | ||
@@ -64,21 +69,2 @@ ```javascript | ||
console.log(res.text); | ||
``` | ||
### winhttp style | ||
```javascript | ||
const curl = new LibCurl(); | ||
curl.open('POST', 'https://xxx.io/api/graphql/'); | ||
curl.setRequestHeaders(`Host: xxx.io | ||
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 | ||
Content-Type: application/octet-stream | ||
Referer: https://xxx.io/ | ||
Accept-Encoding: gzip, deflate, br | ||
Accept-Language: zh-CN,zh;q=0.9 | ||
`); | ||
curl.send(new Uint8Array([1, 255, 188])) | ||
.then(e => { | ||
console.log(curl.getResponseString()); | ||
}); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97064
66