Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
panelIconIdatlassian-info
iconpanelIconfalse:info:
titleThis page has been translated automatically

We want to provide you with the latest help content in your language as soon as possible. This page has been translated automatically and may contain grammatical errors or inaccuracies. We want this content to be useful to you. Please let us know at the bottom of this page if this information was helpful.

View the original article in Russian: GET-запрос

...

bgColor#E3FCEF

Please read the Terms of Use for Materials on ZennoLab

Table of contents

Expand
titleClick here to expand the table of contents
Table of Contents
exclude^Оглавление$

...

Description

ZennoPoster allows using HTTP requests when working with different websites. You can receive data with GET requests, for example, request search results by request in a search enginesystem, download files, parse data, work with API of web services and applications. Performing actions without a browser can significantly reduce the load on computer resources.

...

How

...

to add an action to a project?

Via the context menu Add ActionHTTPGET request

...

Or use smart search .

...

What is it used for?

  • Working templates without a browser

  • A quick way to get data from the site

  • Download files

  • Working with the service API

...

How to work with an action:

...

Main tab

...

...

URL

The address of the site to which the request will be sent

...

,

...

you can use a variable.

...

The resource from which the request is sent can be set to 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

Info

Site addresses can be specified through variables.

How to work with an action: Advanced Tab

...

Set redirection - if the response to the request contains a redirect code (eg response 301, 302), Zennoposter using the Location header will go to the next page. The numbers indicate the maximum number of clicks: 0 - stay on the original page, 5 - the number of clicks to the final url.

...

Disable url encoding from the main tab in urlencode.
Example:
a) Original url - https://ru.wikipedia.org/wiki/Greetings
b) By default - https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82%D1%81%D1%82% D0% B2% D0% B8% D0% B5

...

Headers:
a) Use as default .
b) Current profile .
c) Load from profile - you need to select a file or variable containing the path to the profile.
d) Custom settings - allows you to independently specify each parameter of the request header.

...

Request headers:
a) Each heading starts with a new line.
b) User Agent is always listed first.
c) You can specify static values , custom variables, or profile variables .

...

Cookie - you can specify ready-made or variables.

CookieContainer - Starting from version 5.18.0.0 in the additional settings in the section “Headers: User settings” there is an option “Use CookieContainer” . CookieContainer allows GET / POST requests to share cookies with the browser, i.e. if they are changed as a result of the request, then in the browser they will also change and vice versa. This allows you to easily transfer part of the logic of working with the site to POST / GET requests.

...

Info

You can specify a Cookie in the request or use a CookieContainer.

How to work with an action: Proxy Tab

...

  1. Without a proxy - go to the mail using your home ip.

  2. Current proxy of the project - if you have previously installed a proxy in the project, then the action will take place from them.

  3. Format string - we indicate our proxies in the format (you can specify a variable):
    a) With authorization - socks5: // login: password @ ip: port or http: // login: password @ ip: port
    b) Without authorization - socks5: // ip: port or http: // ip: port
    c) Without specifying the protocol (http: // will be used by default) - login: password @ ip: port or ip: port

  4. Other - select if you need to specify detailed proxy settings. Proxy type, authorization data, address and port. Check with your service provider for information.

...

Info

If no proxy protocol is specified, then http: // will be used by default

Creating Actions from Traffic Monitor Requests

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.

...

Load request content only, only headers, headers and content, as file, as file + headers.

...

The variable to place the request response.

Variable macros can be used.

Load

Content only

Only the response body will be saved to the variable

Expand
titleSample response when requesting https://httpbin.org/get
Code Block
languagejson
{
  "args": {}, 
  "headers": {
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", 
    "Accept-Encoding": "gzip, deflate", 
    "Accept-Language": "en-US,en;q=0.8", 
    "Host": "httpbin.org", 
    "Referer": "https://google.com", 
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36", 
    "X-Amzn-Trace-Id": "Root=1-26erb44t-465basaw0z2qwbji492yh5t3"
  }, 
  "origin": "1.2.3.4", 
  "url": "https://httpbin.org/get"
}

Headers only

Only response headers will be saved

Expand
titleSample response when requesting https://httpbin.org/get
Code Block
HTTP/1.1 200 OK
Date: Sat, 23 May 2020 01:56:45 GMT
Content-Type: application/json
Content-Length: 613
Connection: keep-alive
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

Headers and content

Both the response header and its body will be saved to the variable. They will be separated by two blank lines.

Expand
titleSample response when requesting https://httpbin.org/get
Code Block
HTTP/1.1 200 OK
Date: Sat, 23 May 2020 01:56:45 GMT
Content-Type: application/json
Content-Length: 613
Connection: keep-alive
Server: gunicorn/19.9.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true


{
  "args": {}, 
  "headers": {
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", 
    "Accept-Encoding": "gzip, deflate", 
    "Accept-Language": "en-US,en;q=0.8", 
    "Host": "httpbin.org", 
    "Referer": "https://google.com", 
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36", 
    "X-Amzn-Trace-Id": "Root=1-26erb44t-465basaw0z2qwbji492yh5t3"
  }, 
  "origin": "1.2.3.4", 
  "url": "https://httpbin.org/get"
}

As a file

This mode is worth choosing if you are trying to download a file using a request.

The path to the downloaded file will be saved to the variable.

By default, files are downloaded to the Trash folder in the ZennoPoster installed directory. The path to it may look like this - C: \ Program Files \ ZennoLab \ RU \ ZennoPoster Pro V7 \ 7.4.0.0 \ Progs \ Trash \ googlelogo_color_92x30dp.png

You can change this path in the settings, globally for all projects. Or by using an action during template execution.

As file + headers

The variable will save the response headers and the path to the downloaded file.

Put in 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

Include Page
More tab (queries)
More tab (queries)

...

How to work with an action: Proxy Tab

Include Page
Proxy tab
Proxy tab

...

Creating Actions from Traffic Monitor Requests

Info

Added in ZennoPoster 7.1.5.0 (5.44.0.0)

A ready-made HTTP request can be created directly from the Traffic Window.

...

  1. Hover the cursor over the required query and right-click to call the context menu.

  2. Click Create

...

  1. Action from

...

  1. Request.

A fully populated filled HTTP request action appears on the project canvas.

...

Change the static value or replace it with variables - the action is completely ready to work.

Info

Function availability starts from version 7.1.5.0 ( 5.44.0.0 )

Turn off the browser

If you are not using the browser when working with requests, you must disable it in the Project Settings .

...

Request transfer method

For more information on how to transfer HTTP requests, see Project Settings .

...

Usage example

You need to go to the page and collect all the values for the specified conditions. Since the site gives all the values without using a browser, we turn it off.

...

  1. Turn off the browser.

  2. Add a GET request action.

  3. Configuring.

  4. We receive the response of the request into a variable.

  5. We are looking for the necessary values

Thus, disabling the browser will significantly save computer resources. The difference in the number of threads between working with tabs and queries can be more than significant.

...

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.

...

HTTP-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.

...

Usage example

Find out the current ip address from which the project is running.
To do this, just make a GET request at https://api.ipify.org/, and in the Proxy tab, select the Current proxy of the project.

...

...