File tree 2 files changed +3
-4
lines changed
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ import { AxiosRequestConfig } from 'axios';
2
2
import * as jwt from 'atlassian-jwt' ;
3
3
import * as url from 'url' ;
4
4
import { OAuth } from 'oauth' ;
5
- import * as buildFullPath from 'axios/lib/core/buildFullPath' ;
6
- import * as buildURL from 'axios/lib/helpers/buildURL' ;
7
5
import { Config } from '../config' ;
8
6
9
7
export const getAuthentication = (
@@ -46,7 +44,7 @@ export const getAuthentication = (
46
44
) ;
47
45
48
46
return oauth . authHeader (
49
- buildURL ( buildFullPath ( config . host , request . url ) , request . params ) ,
47
+ url . resolve ( config . host , request . url ! ) ,
50
48
config . authentication . oauth1 . accessToken ,
51
49
config . authentication . oauth1 . tokenSecret ,
52
50
request . method ! ,
Original file line number Diff line number Diff line change @@ -293,7 +293,8 @@ export class Client {
293
293
public async sendRequest ( request : AxiosRequestConfig , callback ?: Callback ) : Promise < any > {
294
294
try {
295
295
request . headers = Utils . removeUndefinedElements ( {
296
- Authorization : getAuthentication ( this . config , request ) ,
296
+ Authorization : getAuthentication ( this . config ,
297
+ { ...request , url : this . requestInstance . getUri ( request ) } ) ,
297
298
...request . headers ,
298
299
} ) ;
299
300
You can’t perform that action at this time.
0 commit comments