How To Use Request Chaining
Chaining can be used to include data of the previous request with the current request.
For example, you can define chaining with the type 'Complete RESPONSE URL' and then use it in the URL field of particular request item.
This will ensure that every execution of the request item will use response URL obtained from the previous execution for its request URL.
If you would like to use chaining with particular request item, follow this procedure:
Open project properties from the main application menu or toolbar and switch to 'Chaining' tab.
In 'Chaining' tab, click 'Add new' button and then specify name for your chaining.
Change definition of your chaining in the right part of the window. In general, you have to specify which piece of current execution data should be stored for possible use with the next request.
When you have completed your chaining definition, click OK button to apply project properties. Your new chaining is now created and stored inside the project.
Create request item and specify its URL. This URL should return data from which chaining defined previously will extract necessary data. Do not include project chaining anywhere in this
item because it only provides data for the next request item.
Create another request item and include project chaining in any of the fields that accept them:
You can use project chaining in these fields in the following ways:
- Request body.
- Additional request headers.
Used project chaining items must always be enclosed in curly braces otherwise HttpMaster will not recognize them as such and will process them as literal text.
- Type name of the chaining directly in the desired field and enclose its name in curly braces.
- Press 'Ctrl+Shift+Space' when inside the field. This will display a list of available chaining items.
- Open list of available actions by clicking the corresponding button located next to the field. List of available actions will include menu option to display list of available chaining items.
Apply changes to both request items.
Execute both items together in a batch; item that will provide data for chaining must be executed first, item that will extract and use chaining data must be executed second.
Inspect execution results of the second request item to verify that the desired data was extracted from the first item and used with the second item.
How to rename project chaining items
Project chaining items can be renamed anytime in project properties. If renamed chaining items are in use in some of the request items, this rename will be reflected immediately in request item definition after project changes are applied (request item properties will be updated with new names).
Even if request item is currently opened for editing in its own tab, UI controls where renamed chaining items are used will be updated with new names immediately.
How to add project chaining items after they have already been specified in request item
It is also possible to enclose some text in request item definition with curly braces even before chaining with such name exists in the project properties.
If you later create chaining with such name in project properties, HttpMaster will determine if some parts of request item properties can be matched with newly created chaining and will automatically connect them
if such matches are found.
Copyright © 2018 by Borvid. All rights reserved.