File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 11import ApiError from "./types/ApiError" ;
2+ import { UserRequestOptions } from "./types/Params" ;
23
34const { version } = require ( "../package.json" ) ;
45
@@ -20,6 +21,7 @@ export interface HttpClientRequestOptions {
2021 data ?: any ;
2122 params ?: any ;
2223 url : string ;
24+ options ?: UserRequestOptions ;
2325}
2426
2527interface RequestHeaders {
@@ -107,6 +109,10 @@ export default class ApiClient implements HttpClient {
107109 baseUrl = requestOptions . baseUrl ;
108110 }
109111
112+ if ( requestOptions ?. options ?. warrantToken ) {
113+ fetchRequestOptions . headers [ 'Warrant-Token' ] = requestOptions . options . warrantToken ;
114+ }
115+
110116 let requestUrl = `${ baseUrl } ${ requestOptions . url } ` ;
111117 if ( requestOptions ?. params ) {
112118 const queryParams = new URLSearchParams ( requestOptions . params ) ;
Original file line number Diff line number Diff line change 1+ export interface UserRequestOptions {
2+ warrantToken ?: string ;
3+ }
You can’t perform that action at this time.
0 commit comments