README.md

This commit is contained in:
tamaina 2023-05-07 12:19:50 +00:00
parent 2d63e2a006
commit 77dd5654bb

View File

@ -42,10 +42,12 @@ npm run serve
### Options ### Options
| Property | Type | Description | Default | | Property | Type | Description | Default |
| :------------------ | :--------------------- | :----------------------- | :------ | | :------------------ | :--------------------- | :------------------------------ | :------ |
| **followRedirects** | *boolean* | Whether follow redirects | `true` | | **lang** | *string* | Accept-Language for the request | `null` |
| **plugins** | *plugin[]* (see below) | Custom plugins | `null` | | **followRedirects** | *boolean* | Whether follow redirects | `true` |
| **plugins** | *plugin[]* (see below) | Custom plugins | `null` |
| **agent** | *Got.Agents* | Custom HTTP agent (see below) | `null` |
#### Plugin #### Plugin
@ -58,6 +60,15 @@ interface IPlugin {
urls are WHATWG URL since v4. urls are WHATWG URL since v4.
#### Custom HTTP agent for proxy
You can specify agents to be passed to Got for proxy use, etc.
https://github.com/sindresorhus/got/blob/v12.6.0/documentation/tips.md#proxying
**⚠If you set some agent, local IP rejecting will not work.⚠️**
(Summaly usually rejects local IPs.)
(Summaly currently does not support http2.)
### Returns ### Returns
A Promise of an Object that contains properties below: A Promise of an Object that contains properties below: