File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " deepdetect-js" ,
3
- "version" : " 1.4.1 " ,
3
+ "version" : " 1.4.3 " ,
4
4
"description" : " DeepDetect JS client" ,
5
5
"license" : " MIT" ,
6
6
"author" : {
Original file line number Diff line number Diff line change @@ -191,13 +191,16 @@ DD.prototype._httpRequest = function _httpRequest(
191
191
searchParams = null
192
192
) {
193
193
return new Promise ( async ( resolve , reject ) => {
194
- const url = this . ddurl + apiMethod ;
194
+ let url = this . ddurl + apiMethod ;
195
195
const requestParams = { method : httpMethod } ;
196
196
197
197
if ( jsonParams != null ) {
198
198
requestParams . body = JSON . stringify ( jsonParams ) ;
199
199
} else if ( searchParams != null ) {
200
- requestParams . search = new URLSearchParams ( searchParams ) ;
200
+ const urlParameters = Object . entries ( searchParams )
201
+ . map ( e => e . join ( '=' ) )
202
+ . join ( '&' ) ;
203
+ url += `?${ urlParameters } ` ;
201
204
}
202
205
203
206
fetch ( url , requestParams ) . then ( response => {
You can’t perform that action at this time.
0 commit comments