mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
examples -> samples POST /transaction and /statuses
This commit is contained in:
@@ -66,31 +66,39 @@ Content-Type: application/json
|
||||
|
||||
|
||||
TPLS['post-tx-response'] = """\
|
||||
HTTP/1.1 201 Created
|
||||
HTTP/1.1 202 Accepted
|
||||
Content-Type: application/json
|
||||
|
||||
%(tx)s
|
||||
Location: ../statuses/%(txid)s
|
||||
"""
|
||||
|
||||
|
||||
TPLS['get-tx-status-request'] = """\
|
||||
GET /transactions/%(txid)s/status HTTP/1.1
|
||||
TPLS['get-statuses-tx-request'] = """\
|
||||
GET /statuses/%(txid)s HTTP/1.1
|
||||
Host: example.com
|
||||
|
||||
"""
|
||||
|
||||
TPLS['get-tx-status-response'] = """\
|
||||
TPLS['get-statuses-tx-invalid-response'] = """\
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"status": "invalid"
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
TPLS['get-statuses-tx-valid-response'] = """\
|
||||
HTTP/1.1 303 See Other
|
||||
Content-Type: application/json
|
||||
Location: ../transactions/%(txid)s
|
||||
|
||||
{
|
||||
"status": "valid"
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
""" Main function """
|
||||
privkey = 'CfdqtD7sS7FgkMoGPXw55MVGGFwQLAoHYTcBhZDtF99Z'
|
||||
|
||||
Reference in New Issue
Block a user