Skip to content

Commit

Permalink
fix: update readme, exclude from prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Battlesquid committed Sep 16, 2024
1 parent 4b83300 commit 166c752
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist
tests
tests
README.md
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
# node-curl-impersonate
# ts-curl-impersonate

Fork of [curl-impersonate-node](https://github.com/wearrrrr/curl-impersonate-node) that adds windows support.
Fork of [curl-impersonate-node](https://github.com/wearrrrr/curl-impersonate-node) that adds windows support along with some other features.

## Install

```sh
# yarn
yarn add node-curl-impersonate
yarn add ts-curl-impersonate

# npm
npm i node-curl-impersonate
npm i ts-curl-impersonate
```

## Usage

```ts
// normal request
const response = await new RequestBuilder().url(/** YOUR URL HERE **/).header("x-foo-bar", "baz").send();
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();
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();
const response = await new RequestBuilder()
.url(/** YOUR URL HERE **/)
.preset({ name: "chrome", version: "110" })
.send();
```

0 comments on commit 166c752

Please sign in to comment.