File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ wwwroot/*.js
22node_modules
33typings
44dist
5+ .DS_Store
56
67.idea
78.vscode
89.history
10+ .npmrc
Original file line number Diff line number Diff line change 11{
22 "name" : " pandadoc-node-client" ,
3- "version" : " 4.3.0 " ,
3+ "version" : " 4.3.1 " ,
44 "description" : " The Official PandaDoc Node client SDK" ,
55 "author" : " PandaDoc" ,
66 "keywords" : [
Original file line number Diff line number Diff line change 11// TODO: evaluate if we can easily get rid of this library
22import * as FormData from "form-data" ;
33import { URLSearchParams } from 'url' ;
4+ import * as http from 'http' ;
5+ import * as https from 'https' ;
46// typings of url-parse are incorrect...
57// @ts -ignore
68import * as URLParse from "url-parse" ;
@@ -48,10 +50,11 @@ export type RequestBody = undefined | string | FormData | URLSearchParams;
4850 */
4951export class RequestContext {
5052 private headers : { [ key : string ] : string } = {
51- "User-Agent" : "pandadoc_node_client/4.3.0 " ,
53+ "User-Agent" : "pandadoc_node_client/4.3.1 " ,
5254 } ;
5355 private body : RequestBody = undefined ;
5456 private url : URLParse ;
57+ private agent : http . Agent | https . Agent | undefined = undefined ;
5558
5659 /**
5760 * Creates the request context using a http method and request resource url
@@ -124,6 +127,14 @@ export class RequestContext {
124127 public setHeaderParam ( key : string , value : string ) : void {
125128 this . headers [ key ] = value ;
126129 }
130+
131+ public setAgent ( agent : http . Agent | https . Agent ) {
132+ this . agent = agent ;
133+ }
134+
135+ public getAgent ( ) : http . Agent | https . Agent | undefined {
136+ return this . agent ;
137+ }
127138}
128139
129140export interface ResponseBody {
You can’t perform that action at this time.
0 commit comments