Skip to content

Commit 92829de

Browse files
authored
Set default User-Agent to SDK/version
1 parent 0f9946d commit 92829de

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/http/http.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ export type RequestBody = undefined | string | FormData | URLSearchParams;
4747
* Represents an HTTP request context
4848
*/
4949
export class RequestContext {
50-
private headers: { [key: string]: string } = {};
50+
private headers: { [key: string]: string } = {
51+
"User-Agent": "pandadoc_node_client/1.1.0",
52+
};
5153
private body: RequestBody = undefined;
5254
private url: URLParse;
5355

@@ -219,4 +221,4 @@ export function wrapHttpLibrary(promiseHttpLibrary: PromiseHttpLibrary): HttpLib
219221
return from(promiseHttpLibrary.send(request));
220222
}
221223
}
222-
}
224+
}

0 commit comments

Comments
 (0)