;;; NOTE: Many types have at key 0 a type identifier (aka type tag). This is
;;; a randomly generated number that helps in tests to ensure that the CBOR
;;; item is the type expected.
;;; Request Header ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
request = {
?0: 7586022,
1: id,
2: path,
3: method,
4: has_body
}
id = uint
re = uint
path = text
has_body = bool
method = 0 ;; GET
/ 1 ;; POST
/ 2 ;; PUT
/ 3 ;; DELETE
/ 4 ;; PATCH
;;; Response Header ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
response = {
?0: 9750358,
1: id,
2: re,
3: status,
4: has_body
}
status = 200 ;; OK
/ 400 ;; Bad request
/ 404 ;; Not found
/ 405 ;; Method not allowed
/ 500 ;; Internal server error
/ 501 ;; Not implemented
;;; Error ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
error = {
?0: 5359172,
?1: path,
?2: method,
?3: message
}
message = text