Skip to content

Latest commit

 

History

History
60 lines (50 loc) · 845 Bytes

README.md

File metadata and controls

60 lines (50 loc) · 845 Bytes

HyperJSON Request Message

Version 0.0.1

Prerequisites

Schema

./request-schema.json

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "name": "HyperJSON Request Message",
  "type": "object",
  "properties": {
    "method": {
      "type": "string"
    },
    "uri": {
      "type": "string"
    },
    "body": {
      "type": "object"
    }
  },
  "required": [
    "method",
    "uri"
  ]
}

Valid Samples

// minimal
{
  method: 'GET',
  uri: '/users'
}

// with an optional body included
{
  method: 'POST',
  uri: '/users',
  body: {
    name: 'Obama'
  }
}

// with a query string
{
  method: 'GET',
  uri: '/users?name=Bush'
}