File tree 1 file changed +25
-6
lines changed
1 file changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -471,18 +471,37 @@ private function http(
471
471
) {
472
472
$ this ->resetLastResponse ();
473
473
$ this ->resetAttemptsNumber ();
474
- $ url = sprintf (
474
+ $ this ->response ->setApiPath ($ path );
475
+ if (!$ json ) {
476
+ $ parameters = $ this ->cleanUpParameters ($ parameters );
477
+ }
478
+ return $ this ->makeRequests (
479
+ $ this ->apiUrl ($ host , $ path ),
480
+ $ method ,
481
+ $ parameters ,
482
+ $ json ,
483
+ );
484
+ }
485
+
486
+ /**
487
+ * Generate API URL.
488
+ *
489
+ * Overriding this function is not supported and may cause unintended issues.
490
+ *
491
+ * @param string $host
492
+ * @param string $path
493
+ *
494
+ * @return string
495
+ */
496
+ protected function apiUrl (string $ host , string $ path )
497
+ {
498
+ return sprintf (
475
499
'%s/%s/%s%s ' ,
476
500
$ host ,
477
501
$ this ->apiVersion ,
478
502
$ path ,
479
503
$ this ->extension (),
480
504
);
481
- $ this ->response ->setApiPath ($ path );
482
- if (!$ json ) {
483
- $ parameters = $ this ->cleanUpParameters ($ parameters );
484
- }
485
- return $ this ->makeRequests ($ url , $ method , $ parameters , $ json );
486
505
}
487
506
488
507
/**
You can’t perform that action at this time.
0 commit comments