Skip to content
This repository was archived by the owner on Apr 29, 2020. It is now read-only.

Commit 5c1854b

Browse files
committed
Fixed object put call
1 parent 720439f commit 5c1854b

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

apiary.apib

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8231,43 +8231,44 @@ Stores input as a DAG object, outputs its key.
82318231

82328232
```
82338233
{
8234-
"Data": "hello world"
8234+
"data": "hello world"
82358235
}
82368236
```
82378237

82388238
#### curl
82398239

8240-
curl -i -X POST -F "data=@test" "http://localhost:5001/api/v0/object/put&inputenc=json"
8240+
curl -i -X POST -F "data=@test" "http://localhost:5001/api/v0/object/put?inputenc=json"
82418241

82428242
+ Body
82438243

82448244
```
8245-
curl -i -X POST -F "data=@test" "http://localhost:5001/api/v0/object/put&inputenc=json"
8245+
curl -i -X POST -F "data=@test" "http://localhost:5001/api/v0/object/put?inputenc=json"
82468246
```
82478247

8248-
+ Response 400
8248+
+ Response 200
82498249

82508250
+ Headers
82518251

82528252
```
8253+
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
8254+
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
82538255
Content-Type: application/json
8256+
Server: go-ipfs/0.4.0-dev
82548257
Trailer: X-Stream-Error
8255-
Transfer-Encoding: chunked
8256-
Date: Thu, 04 Feb 2016 17:11:57 GMT
8257-
Connection: close
8258+
Date: Sun, 20 Mar 2016 23:32:13 GMT
82588259
Transfer-Encoding: chunked
82598260
```
82608261

8261-
+ Attributes (Error)
8262-
- Message: "This command can't be called directly. Try one of its subcommands."
8263-
- Code: 1
8262+
+ Attributes (object)
8263+
- Hash (Multihash)
8264+
- Links (array, nullable)
82648265

82658266
+ Body
82668267

82678268
```
82688269
{
8269-
"Message": "This command can't be called directly. Try one of its subcommands.",
8270-
"Code": 1
8270+
"Hash": "QmU1Sq1B7RPQD2XcQNLB58qJUyJffVJqihcxmmN1STPMxf",
8271+
"Links": []
82718272
}
82728273
```
82738274

0 commit comments

Comments
 (0)