registerHeader(name, value)
Registers the specified external header to service-broker fetch calls.
Returns
A Boolean value that indicates if the external header has been registered to service-broker fetch calls.
- If the specified external header already exists, the Boolean value
false
is returned. - If the specified external header is registered successfully, the Boolean value
true
is returned.
Parameters
Name | Type | Description | Required |
name | string | The name of the external header that must be registered to service-broker fetch calls. | ✅ |
value | string | The value corresponding to the specified external header. | ✅ |
Usage example
In this example, the API registers the external header with the name
abc
and value xyz
to service-broker fetch
calls and returns the Boolean value true
.
PCore.getRestClient().getHeaderProcessor().registerHeader("abc", "xyz");
Previous topic getRegisteredHeaders() Next topic unRegisterHeader(name)