File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -50,15 +50,6 @@ export default class API {
5050 const placeholders = args . placeholders || { } ;
5151 const options = args . options || { } ;
5252
53- const augmentedOptions = {
54- ...options ,
55- headers : this . config . configureHeaders ( {
56- 'Content-Type' : 'appication/json' ,
57- Accept : 'application/json' ,
58- ...options . headers
59- } )
60- } ;
61-
6253 const missingPlaceholders = requiredPlaceholders . filter ( name => ! placeholders [ name ] ) ;
6354 if ( missingPlaceholders . length ) {
6455 console . error ( `The ${ name } API call cannot be performed. The following params were not specified: ${ missingPlaceholders . join ( ', ' ) } ` ) ;
@@ -75,6 +66,15 @@ export default class API {
7566 }
7667
7768 const createRequest = ( ) => {
69+ const augmentedOptions = {
70+ ...options ,
71+ headers : this . config . configureHeaders ( {
72+ 'Content-Type' : 'appication/json' ,
73+ Accept : 'application/json' ,
74+ ...options . headers
75+ } )
76+ } ;
77+
7878 const opts = this . config . configureOptions ( augmentedOptions ) ;
7979 const reqPath = applyUrlWithPlaceholders ( path , placeholders ) ;
8080 let baseUrl = this . config . baseUrl ;
You can’t perform that action at this time.
0 commit comments