HttpHandlers
The httpHandlers section allows you to create message handlers as a middleware in your Http Client Communications.
This is useful when you needed add a default behavior on all requests for a given service, as an example, add the Token in Authorization header.
Fields
A httpHandler contains the following fields to be defined:
Name
The name of httpHandler to be created.
Requirements Rules:
- Is Required;
- Must not be a Reserved Keyword;
- Must start with a letter;
- Must contains only letters, numbers and the underline char ('_');
- Max length of 50 chars
Example:
1 2 |
|
Type
The type of httpHandler to be created.
Possible types are:
- AddClientAccessToken: Adds a ClientApp access Token to all requests for an HttpCommunication client. This type uses credentials from ClientApps registered with the grant type 'client_credential', which are specifically used for 'System x System' communication.
Requirements Rules:
- Is Required;
- The type must be valid, according to the types informed above
Example:
1 2 3 |
|
BackChannelName
The HttpCommunication name that will be used if the current httpHandler needs to make a Http call.
Requirements Rules:
- Is Required when the type is AddClientAccessToken;
- The name must exist in HttpCommunication list in the current model
Example:
1 2 3 4 |
|
AddClientAccessTokenParams
Information for obtaining the Token that will be attached to each Http call. The filling is optional and exclusive for the AddClientAccessToken type.
Requirements Rules:
- Must be filled out only for the AddClientAccessToken type;
- Must follow the rules as specified in AddClientAccessTokenParams
Example:
1 2 3 4 5 6 7 8 |
|