• Docs
  • Home

›HTTP Requests

Messages

  • Set Property Fixed
  • Delete Message Property
  • Move Property
  • Map Range

Data Formats

  • Convert to/from JSON
  • Convert to/from XML
  • Convert to/from YAML
  • Generate CSV output
  • Parse CSV input
  • Simple GET request
  • Split text

Flow Control

  • Trigger On Start
  • Trigger At Interval
  • Trigger At Time
  • Route On Property
  • Route On Context
  • Operate On Array
  • Trigger Timeout
  • Trigger Placeholder
  • Rate Limit Messages
  • Rate Limit Message Stream
  • Report By Exception
  • Join Streams

Error handling

  • Retry On Error
  • Trigger On Error

HTTP Endpoints

  • Create Endpoint
  • Handle Query Parameters
  • Handle Url Parameters
  • Access Headers
  • Serve JSON
  • Serve Local File
  • Post Data
  • Post Form Data
  • Post JSON
  • Cookies

HTTP Requests

  • GET Request
  • Set URL
  • Set URL using Template
  • Set Query String
  • Parse JSON
  • Binary Response
  • Set Request Header

MQTT

  • MQTT broker
  • Publish Message
  • Set the topic
  • Publish Retained Message
  • Subscribe to a topic
  • Receive a parsed JSON message

OData

  • Define a Metadata Model
  • Define Metadata Model using EDM
  • Convert Request to Query
  • Read Only OData Service
  • Create an OData Service

Sequelize

  • Execute a Query

Auth

  • Basic Authentication
  • Generate JWT
  • Verify JWT

JSONata

  • JSONata Node
  • JSONata Explorer

Breakpoint

  • Introduction
  • How to Use

OpenAPI

  • Introduction
  • OpenAPI Router
  • OpenAPI Client

Release Management

  • Upload Download Release Management

Designer

  • Designer

Monitor

  • Introduction
  • How To Use

CI/CD

  • Introduction
  • Installation

Simple GET request

Problem

You want to make a simple GET request to a web site and extract useful information.

Solution

Use the HTTP Request node to make an HTTP request and an HTML node to extract elements from the retrieved html document.

Example

Flow JSON

[{"id":"d88dd470.0ac7b8","type":"inject","z":"18c99b30.cf9d35","name":"make request","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":130,"y":180,"wires":[["874a3d4e.9b666"]]},{"id":"874a3d4e.9b666","type":"http request","z":"18c99b30.cf9d35","name":"","method":"GET","ret":"txt","url":"https://nodered.org","tls":"","x":294.5,"y":180,"wires":[["90243cc1.87edc"]]},{"id":"7403c68f.21d7c8","type":"debug","z":"18c99b30.cf9d35","name":"","active":true,"console":"false","complete":"false","x":650,"y":180,"wires":[]},{"id":"90243cc1.87edc","type":"html","z":"18c99b30.cf9d35","name":"","property":"","tag":".Ignite-latest-version","ret":"text","as":"single","x":471.5,"y":180,"wires":[["7403c68f.21d7c8"]]}]

Discussion

To find content in a web page, the Chrome browser’s ‘Inspect Element’ can be a useful tool. Using the browser, right click on a page element to see the tags, ids and classes applied to an element as shown.

In this example we retrieve the latest version of Ignite. Using the inspector we can see the version is located in a <span> tag with the class Ignite-latest-version.

The HTML node can be configured with the CSS selector .Ignite-latest-version to return a message for each matching element.

← CookiesSet URL →
  • Problem
  • Solution
  • Example
  • Discussion
Copyright © 2021 Cyber Group