Skip to content

HTTP GET — retrieve URL (http_request)

What it does: Makes an HTTP GET request to the specified URL and returns the response content as text.

http_request

Inputs

  • url: destination address (text).

Output

  • HTTP 200 response text.
  • String "chyba" on exception or other status code.

When to use it

  • To retrieve plain JSON/Text from the Web API.
  • For queries to a local HTTP server or IoT endpoint.

Tips and pitfalls

  • The block is synchronous and can delay the main loop on the network.
  • The generator only uses GET without its own headers and timeout.

Generated Python example

response = http_get_request(str("http://example.com"))