Skip to content

Test! Adding the "Web of Things (WoT) HTTP Binding" #52

@egekorkan

Description

@egekorkan

Name of the Binding

Web of Things (WoT) HTTP Binding

Link to the binding document

https://w3c.github.io/wot-binding-templates/bindings/protocols/http/

Binding Prefix

htv

Binding Identification

URI Scheme: http:// in href or base term

Supported TD version

  • V1.0
  • V1.1
  • V2.0

Binding Version

1.0-2026-01-15

Summary of the Binding

Abstract

In the context of the Web of Things (WoT), a Binding is a blueprint that gives guidance on how to implement a specific IoT protocol, data format or IoT platform. The WoT Thing Description specification explains the overall mechanism and the WoT Binding Registry provides the formal requirements for any binding to follow. This document is a binding for the Hypertext Transfer Protocol (HTTP), which is one of the most used protocols in the Internet to exchange any kind of data related to Webpages, Web APIs, IoT devices and much more.

More specifically, it defines a set of vocabulary terms that can be used inside a Thing Description document, and associated rules which allow to describe WoT operations using HTTP over the network. Additionally, relevant examples are provided to showcase different vocabulary terms and the associated behavior.

Examples

TD with HTTP vocabulary included in @context

{
  "@context": ["https://www.w3.org/ns/wot-next/td", 
    {"htv":"http://www.w3.org/2011/http#"}
  ],
  "id": "urn:uuid:9cd44eef-0b3f-4566-94b0-1358af3d86bd",
  "title": "MyLampThing",
  "properties": {
    "temperature": {
      "type": "string",
      "forms": [
        {
          "href": "http://example.com/properties/temperature",
          "op": "readproperty",
          "htv:methodName": "GET"
        }
      ]
    },
    "humidity": {
      "type": "string",
      "forms": [
        {
          "href": "http://example.com/properties/humidity",
          "op": "readproperty",
          "htv:methodName": "GET",
          "contentType": "application/json",
          "htv:headers": [
            {
              "@type": "htv:RequestHeader",
              "htv:fieldValue": "application/json",
              "htv:fieldName": "Accept"
            }
          ]
        },
        {
          "href": "http://example.com/properties/humidity",
          "op": "readproperty",
          "htv:methodName": "GET",
          "contentType": "application/cbor",
          "htv:headers": [
            {
              "@type": "htv:RequestHeader",
              "htv:fieldValue": "application/cbor",
              "htv:fieldName": "Accept"
            }
          ]
        }
      ]
    }
  },
  "actions": {
    "toggle": {
      "forms": [
        {
          "op": "invokeaction",
          "href": "https://mylamp.example.com/actions/toggle",
          "htv:methodName": "POST"
        }
      ]
    }
  },
  "events": {
    "error": {
      "data": {
        "type": "string"
      },
      "forms": [
        {
          "op": "subscribeevent",
          "href": "https://mylamp.example.com/events/error",
          "subprotocol": "longpoll"
        }
      ]
    }
  }
}

Access and Usage Restrictions

Reading: Open and free to read
Implementation: Royalty-free patent policy

(Not researched for correct wording yet)

Dependent Bindings

None.

(JSON is not a dependency yet)

Available Machine-readable Documents

  • JSON Schema
  • Ontology
  • JSON-LD Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    new-bindinga new binding submission using the issue template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions