Skip to content

HyperJSON/HyperJSON-Request

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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'
}

About

JSON Schema that closely resembles an HTTP Request Message but is completely decoupled from any specific application protocol, such as HTTP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published