flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
45
VISUALIZACION/node_modules/hpagent/test/index.test-d.ts
generated
vendored
Executable file
45
VISUALIZACION/node_modules/hpagent/test/index.test-d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
import * as http from 'http'
|
||||
import * as https from 'https'
|
||||
import { expectType } from 'tsd'
|
||||
import {
|
||||
HttpProxyAgent,
|
||||
HttpProxyAgentOptions,
|
||||
HttpsProxyAgent,
|
||||
HttpsProxyAgentOptions
|
||||
} from '../'
|
||||
|
||||
{
|
||||
const agent = new HttpProxyAgent({
|
||||
keepAlive: true,
|
||||
keepAliveMsecs: 1000,
|
||||
maxSockets: 256,
|
||||
maxFreeSockets: 256,
|
||||
proxy: 'http://localhost:8080'
|
||||
})
|
||||
|
||||
expectType<HttpProxyAgent>(agent)
|
||||
http.request({
|
||||
method: 'GET',
|
||||
hostname: 'localhost',
|
||||
port: 9200,
|
||||
agent
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
const agent = new HttpsProxyAgent({
|
||||
keepAlive: true,
|
||||
keepAliveMsecs: 1000,
|
||||
maxSockets: 256,
|
||||
maxFreeSockets: 256,
|
||||
proxy: 'http://localhost:8080'
|
||||
})
|
||||
|
||||
expectType<HttpsProxyAgent>(agent)
|
||||
https.request({
|
||||
method: 'GET',
|
||||
hostname: 'localhost',
|
||||
port: 9200,
|
||||
agent
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue