This repository was archived by the owner on Nov 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -241,13 +241,13 @@ def do_it(args):
241241
242242 usage = ('usage: cli4 '
243243 + '[-V|--version] [-h|--help] [-v|--verbose] [-q|--quiet] '
244- + '[-j|--json] [-y|--yaml] [-n|ndjson]'
244+ + '[-j|--json] [-y|--yaml] [-n|ndjson] '
245245 + '[-r|--raw] '
246246 + '[-d|--dump] '
247247 + '[-p|--profile profile-name] '
248248 + '[--get|--patch|--post|--put|--delete] '
249249 + '[item=value|item=@filename|@filename ...] '
250- + '/command...' )
250+ + '/command ...' )
251251
252252 try :
253253 opts , args = getopt .getopt (args ,
@@ -314,8 +314,8 @@ def do_it(args):
314314 if arg [0 ] == '@' :
315315 # a file to be uploaded - used in workers/script - only via PUT
316316 filename = arg [1 :]
317- if method != 'PUT' :
318- sys .exit ('cli4: %s - raw file upload only with PUT' % (filename ))
317+ if method not in [ 'PUT' , 'POST' ] :
318+ sys .exit ('cli4: %s - raw file upload only with PUT or POST ' % (filename ))
319319 try :
320320 if filename == '-' :
321321 content = sys .stdin .read ()
You can’t perform that action at this time.
0 commit comments