furo-custom-method #
@furo/data v2.18.0
import '@furo/data/src/furo-custom-method.js';
exports FuroCustomMethod js
exports <furo-custom-method>
custom-element-definition
superclass LitElement
mixes FBP
summary interface component to handle custom methods
furo-custom-method
is a interface component to handle custom methods.
|
|
- before you can do any requests, the service, method and the HATEOAS must be known
Attributes and Properties #
service #
service
String
Setze den Service
method #
method
String
Name of the custom method / rel.
Events #
hts-updated #
at-hts-updated
→ HTS
Fired when hts was updated by fn-hts-in
.
request-aborted #
at-request-aborted
→ Request
Fired when a request was canceled.
request-started #
at-request-started
→ Request
Fired when a request is sent.
response-raw #
at-response-raw
→ Object
Fired when a response is received.
response-error #
at-response-error
→ Object
Fired when an error has occoured. This is a general error event. The specific error events are fired additionally.
response-error-[status-code] #
at-response-error-[status-code]
→ Object
Fired when an error has occoured. This is a specific error event.
fatal-error #
at-fatal-error
→ Request
Requests are made via the Fetch API if possible.Fallback XMLHttpRequest
response-error-4xx #
at-response-error-4xx
→ Object
Fired when an error has occoured. This is a group error event. E.g. response-error-5xx, response-error-4xx
response-error-5xx #
at-response-error-5xx
→ Object
Fired when an error has occoured. This is a group error event. E.g. response-error-5xx, response-error-4xx
response-error-raw #
at-response-error-raw
→ Object
Fired when a error has occoured.
response #
at-response
→ Object
Fired when a response is received.
Methods #
updateQp #
updateQp(qp `` key Object
) ⟹ void
`` Object
→
fn-update-qp
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
- qp
- key value pairs
bindRequestData #
bindRequestData(dataObject `` ) ⟹ void
`` → fn-bind-request-data
Binds a furo-data-object type.
- dataObject
clearQp #
clearQp() ⟹ void
*
→
fn-clear-qp
clear the query params that you have setted before
trigger #
trigger() ⟹ void
*
→
fn-trigger
trigger the method with respect for binded-requset-object
triggerEmpty #
triggerEmpty() ⟹ void
*
→
fn-trigger-empty
triggerWithBody #
triggerWithBody(body `` ) ⟹ void
`` → fn-trigger-with-body
trigger the method with data
- body
htsIn #
htsIn(hts `` ) ⟹ void
`` → fn-hts-in
- hts
abortPendingRequest #
abortPendingRequest() ⟹ void
*
→
fn-abort-pending-request
Aborts a pending request