Skip to content

Commit 3a2aae4

Browse files
committed
issue2551067 corrections/cleanup.
1 parent 45c285e commit 3a2aae4

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

doc/rest.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,8 @@ like::
624624
Lines are wrapped for display, content value is one really long
625625
line. If the data is not utf-8 compatible, you will get a link.
626626

627-
Retrieving the contents of a file is slightly different. Performing a
628-
get on a file returns::
627+
Retrieving the contents of a file is similar. Performing a
628+
get on ``https://.../demo/rest/data/file/11`` returns::
629629

630630
{
631631
"data": {
@@ -648,20 +648,20 @@ get on a file returns::
648648
}
649649
}
650650

651-
To get the file contents in binary form, you currently have to go
652-
outside of the rest interface. You can use the name and content link
653-
to download the binary data stream. Perform a get on: the link value
654-
with the name appended. So for this example you would get:
655-
``https://.../demo/file11/afile``. You will receive a response of type
651+
To download the file contents for this example you would
652+
perform an http GET using: ``https://.../demo/file11/``. The trailing
653+
/ is required. You will receive a response of type
656654
application/octet-stream.
657655

658-
using ``@verbose=3`` the content is displayed as (wrapped for display)::
656+
If you perform a get on
657+
``https://.../demo/rest/data/file/11?@verbose=3`` the content field
658+
above is displayed as (wrapped for display)::
659659

660660
"content": "file11 is not text, retrieve using binary_content
661661
property. mdsum: bd990c0f8833dd991daf610b81b62316",
662662

663663

664-
You can then use the `binary_content property`_ described below to
664+
You can use the `binary_content property`_ described below to
665665
retrieve an encoded copy of the data.
666666

667667
Other query params
@@ -1170,7 +1170,7 @@ returns::
11701170
"id": "11",
11711171
"type": "<class 'bytes'>",
11721172
"link": "https://.../demo/rest/data/file/11/binary_content",
1173-
"data": "b'\\x00\\x00\\x01\\x00\\x01...\xec?\\x00\\x00'",
1173+
"data": "b'\\x00\\x00\\x01\\x00\\x01...\\xec?\\x00\\x00'",
11741174
"@etag": "\"74276f75ef71a30a0cce62dc6a8aa1bb\""
11751175
}
11761176
}
@@ -1179,6 +1179,8 @@ returns::
11791179
as a data stream rather than encoded. See `Getting Message and Files
11801180
Content`_.
11811181

1182+
The data is a json encoded hexidecimal representation of the data.
1183+
11821184

11831185
Other Supported Methods for fields
11841186
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)