Skip to content

Commit cbc7038

Browse files
jpan-boxJeff-Meadows
authored andcommitted
updated make_request to include info about passing a body (#265)
1 parent 71056e2 commit cbc7038

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,19 @@ supported by the SDK. You can still use these endpoints by using the ``make_requ
276276
The ``Client`` class and Box objects have a ``get_url`` method. Pass it an endpoint
277277
to get the correct URL for use with that object and endpoint.
278278

279+
For API calls which require a body, ``make_request()`` accepts ``**kwargs`` after ``method`` and ``url``.
280+
281+
.. code-block:: python
282+
283+
# https://developer.box.com/reference#update-terms-of-service-user-status
284+
# Updates a user's ToS status
285+
286+
# JSONify the body
287+
body = json.dumps({"is_accepted":true})
288+
289+
# Pass body as "data" argument
290+
client.make_request(method, url, data = body)
291+
279292
Box Developer Edition
280293
---------------------
281294

0 commit comments

Comments
 (0)