Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 9a0a10a

Browse files
committed
Merge branch '101187_content_type_parameter'
2 parents 7fdc0ae + 33b14b7 commit 9a0a10a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

apiclient.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,18 @@ are query, or body parameters.
7777

7878
## Calls with body parameters
7979

80-
Body parameters are entered in the command line the same way as query
81-
parameters, `--<param_name>="<param_value>"`, except you must specify the
82-
content type of the body you are sending with the `--content_type TYPE`
83-
argument. For example, to bulkload data to an existing set of element type
84-
ALN named `exampleset`:
80+
Body parameters are entered in the command line the same way as query
81+
parameters, `--<param_name>="<param_value>"`, except you must specify the
82+
content type of the body you are sending with the `--content_type TYPE` or
83+
`--request_format TYPE` argument. For example, to bulkload data to an existing
84+
set of element type ALN named `exampleset`:
8585

8686
python apiclient.py --api /referencedata/sets/bulkLoad/exampleset
8787
--method POST --content_type="application/json"
8888
--params data="['value1','value2','value3']"
8989

90-
The `--request_format` argument needs to be specified or the body will be sent
91-
as a query parameter, and the API call will fail.
90+
The `--request_format` or `--content_type` argument needs to be specified or
91+
the body will be sent as a query parameter, and the API call will fail.
9292

9393
## Miscellaneous command line arguments
9494

apiclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def get_parser():
5959
'application/json, application/xml, ' +
6060
'application/csv, or text/table. Defaults to json.',
6161
action='store', default='application/json')
62-
parser.add_option('--request_format',
62+
parser.add_option('--request_format', '--content_type',
6363
help='Content-type of body parameter. Required only ' +
6464
'for endpoints that have \'body\' parameters.')
6565
parser.add_option('-v', '--version',

0 commit comments

Comments
 (0)