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 11{
22 "name" : " deepdetect-js" ,
3- "version" : " 1.4.1 " ,
3+ "version" : " 1.4.3 " ,
44 "description" : " DeepDetect JS client" ,
55 "license" : " MIT" ,
66 "author" : {
Original file line number Diff line number Diff line change @@ -191,13 +191,16 @@ DD.prototype._httpRequest = function _httpRequest(
191191 searchParams = null
192192) {
193193 return new Promise ( async ( resolve , reject ) => {
194- const url = this . ddurl + apiMethod ;
194+ let url = this . ddurl + apiMethod ;
195195 const requestParams = { method : httpMethod } ;
196196
197197 if ( jsonParams != null ) {
198198 requestParams . body = JSON . stringify ( jsonParams ) ;
199199 } 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 } ` ;
201204 }
202205
203206 fetch ( url , requestParams ) . then ( response => {
You can’t perform that action at this time.
0 commit comments