@pricething/curl
Version:
A typescript wrapper around cURL-impersonate.
37 lines (28 loc) • 755 B
Markdown
Fork of [curl-impersonate-node](https://github.com/wearrrrr/curl-impersonate-node) that adds windows support along with some other features.
```sh
yarn add @pricething/curl
npm i @pricething/curl
```
```ts
// normal request
const response = await new RequestBuilder()
.url(/** YOUR URL HERE **/)
.header("x-foo-bar", "baz")
.send();
// make a post request
const response = await new RequestBuilder()
.url(/** YOUR URL HERE **/)
.method("POST")
.body({ foo: "bar" })
.send();
// use a browser preset (options vary by platform)
const response = await new RequestBuilder()
.url(/** YOUR URL HERE **/)
.preset({ name: "chrome", version: "110" })
.send();
```