HTTP requests
Please read the Terms of Use for Materials on ZennoLab
Table of contents
Description
You can create any type of HTTP request: Put , Delete , Head , Options , Patch , Trace .
There are separate actions for POST and GET requests - POST request and GET request
How to add an action to a project?
Via the context menu Add Action → HTTP → HTTP Request
Or use smart search .
What is it used for?
Project work without a browser
Passing data to a resource
Uploading files to the server
Receiving data from the site
Working with the service API
How to work with an action: Main tab
Request type
Select the required request from the list:
a) Put
b) Delete
c) Head
d) Options
e) Patch
f) Trace
URL
The address of the site to which the request will be sent., You can use a variable.
Referer
The Referer request header contains the URL of the original page from which the current page was navigated. The Referer header allows the server to find out where the link to the requested page came from.
Variable macros can be used.
Encoding
The encoding in which the request will be sent.
Timeout
The maximum time to wait for a response from the site in seconds. When the set time is reached, the action will be completed with an error and will exit on the red thread.
Variable macros can be used.
Data
Content of the request.
Data type
Here you need to select what data is sent using this request. The value selected here is passed as the Content-Type header.
urlencoded
It should be used when text information is sent to the server, which is specified in the Data field in the format parameter name1 = value1 & parameter name2 = value2
Content-Type: application/x-www-form-urlencoded
multipart
This type should be chosen when you send binary data (files) to the server using a request.
Content-Type: multipart/form-data
Other
You can specify a different data type if the ones described above do not fit.
For example, to interact with the CapMonster Cloud API, data must be sent by POST as a JSON request. To achieve this, select Other from the drop-down list and enter application/json
in the field that appears.
Load
Content only
Only the response body will be saved to the variable
Headers only
Only response headers will be saved
Headers and content
Both the response header and its body will be saved to the variable. They will be separated by two blank lines.
As a file
The path to the file will be saved to the variable.
As file + headers
The variable will save the response headers and the path to the downloaded file.
Put to variable
Here you need to select (or create a new) variable into which the query result will be saved.
How to work with an action: More Tab
How to work with an action: Proxy Tab
Creating Actions from Traffic Monitor Requests
A ready-made HTTP request can be created directly from the Traffic Window .
Hover the cursor over the required query and right-click the context menu.
Click Create action from request .
A fully populated HTTP request action appears on the project canvas.
Change the static value or replace it with variables - the action is completely ready to work.
Do not use a browser
If you work exclusively with the help of requests, then you can turn off the browser, thereby saving computer resources; you can do this either in the project settings or using the Browser Settings action.
Request transfer method
ZennoPoster has two methods of working with requests - third-party development (standard method, Chilkat library) and our own (alternative method). If something does not work for you when working with HTTP requests using the standard method, then try switching to an alternative method.
You can change the method of sending requests in the program settings (globally for all projects) or in the settings of a specific project.
Useful links