You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** Base service setting cors, fetch adapter and base url of the api */exportconstSimpleBaseService=newApiService({adapter: fetch,url: "http://localhost:8080/api",mode: 'cors'});
UserService.js
/** Just a simple hook to log the payload before each request. */constbeforeLoggingRequest=({ payload, next })=>{console.log("Before User Service Call");console.log(payload);next(payload);};/** Extending the base service and setting up the before hook.*/constUserService=SimpleBaseService.extend({hooks: {before: beforeLoggingRequest}});
Then when using with doUniqueRequest the url is being duplicated:
const{ success, result }=awaitUserService.doUniqueRequest({method: "GET"});
This call logs:
> Before User Service Call
> {url: "http://localhost:8080/api/http://localhost:8080/api", mode: "cors", method: "GET"}
method: "GET"
mode: "cors"
url: "http://localhost:8080/portalcesa/http://localhost:8080/portalcesa"
Description
When using
doUniqueRequest
with ApiService the url is being duplicated.Using
doRequest
works fine.Reproduce
BaseService.js
UserService.js
Then when using with
doUniqueRequest
the url is being duplicated:This call logs:
It also throws this exception (screenshot): http://prntscr.com/p5feym
The text was updated successfully, but these errors were encountered: