Support
Blues.io
Notehub.io
Shop
Support
Blues.io
Notehub.io
Shop
×
HomeReference
Glossary
Notecard Walkthrough
Overview
Notecard Requests & Responses
JSON Fundamentals
Notecard Interfaces
Essential Requests
Time & Location Requests
Inbound Requests & Shared Data
Web Transactions
Low Power Design
Low Bandwidth Design
Host Firmware Update Requests
Advanced Notecard Configuration
Complete API Reference
Introduction
card Requests
dfu Requests
env Requests
file Requests
hub Requests
note Requests
web Requestsweb.getweb.postweb.put

web Requests

The Notecard can perform requests and obtain responses from 3rd Party APIs and services with the web API requests.

note

Caveats When Performing Web Requests:

  • The Notecard must be in continuous mode and connected to Notehub to perform any of the requests below.
  • The endpoint to the 3rd party API or service must be configured as a proxy Route in Notehub as a "Proxy for Device Web Requests" type.

For more information on these requirements, see the Web Transactions Guide.

web.get

Performs a simple HTTP or HTTPS GET request against an external endpoint, and returns the response to the Notecard.

warning

The Notecard can only accept valid JSON in response to a web.get request. Full HTML and other types of responses will result in a parse error on the Notecard.

Arguments

route

string

Alias for a Proxy Route in Notehub.

name

string (optional)

A web URL endpoint relative to the host configured in the Proxy Route.

    Response Members

    result

    integer

    The HTTP Status Code.

    body

    JSON object

    The JSON response body from the external service, if any.

    Example Response
    {
      "result": 200,
      "body": { "temp": 75, "humidity": 49}
    }
    

    web.post

    Performs a simple HTTP or HTTPS POST request against an external endpoint, and returns the response to the Notecard.

    Arguments

    route

    string

    Alias for a Proxy Route in Notehub.

    name

    string (optional)

    A web URL endpoint relative to the host configured in the Proxy Route.

    body

    string (optional)

    The JSON body to send with the request.

      Response Members

      result

      integer

      The HTTP Status Code.

      body

      JSON object

      The JSON response body from the external service, if any.

      Example Response
      {
        "result": 201
      }
      

      web.put

      Performs a simple HTTP or HTTPS PUT request against an external endpoint, and returns the response to the Notecard.

      Arguments

      route

      string

      Alias for a Proxy Route in Notehub.

      name

      string (optional)

      A web URL endpoint relative to the host configured in the Proxy Route.

      body

      string (optional)

      The JSON body to send with the request.

        Response Members

        result

        integer

        The HTTP Status Code.

        body

        JSON object

        The JSON response body from the external service, if any.

        Example Response
        {
          "result": 204
        }
        
        More information:
        • Web Transactions Guide
        note Requests
        Can we improve this page? Send us feedbackRate this page
        • ★
          ★
        • ★
          ★
        • ★
          ★
        • ★
          ★
        • ★
          ★
        © 2021 Blues Inc.Terms & ConditionsPrivacy
        blues.ioTwitterLinkedInGitHubHackster.io
        Disconnected
        Disconnected
        Having trouble connecting?

        Try changing your Micro USB cable as some cables do not support transferring data. If that does not solve your problem, contact us at support@blues.com and we will get you set up with another tool to communicate with the Notecard.

        Connect a NotecardClick 'Connect' and select a USB-connected Notecard to start issuing requests from the browser.