AgentHelper

AgentHelper #

@furo/furo-data v2.18.0
import '@furo/data/src/lib/AgentHelper.js';
exports AgentHelper js


This is a helper class for the agents #

Update query params a qp like {“active”:true} will just update the qp active

If the current value of the qp is not the same like the injected value, a qp-changed event will be fired

Attributes and Properties #

Methods #

updateQp #

updateQp(caller *qp* ) ⟹ void

  • caller
  • qp

setQp #

setQp(caller Object qp QueryParams ) ⟹ void

Set query params All existing query params are replaced by the transferred parameters If the transferred object is empty or undefined, all the values will be removed!

  • caller caller
  • qp Queryparam Object

getParams #

getParams(caller *link* ) ⟹ Object

get existing params from href and append query params

  • caller
  • link

rebuildQPFromParams #

rebuildQPFromParams(params `` ) ⟹ []

rebuild qp from params

  • params

generateHeaderAccept #

generateHeaderAccept(caller *services* rel `` ) ⟹ string

generate accept field for header

  • caller
  • services
  • rel

generateReq #

generateReq(link *qp* ) ⟹ string

generate request url from original link and qp

  • link
  • qp