Closed alexander-haller closed 4 months ago
In GitLab by @mhxion on Jun 13, 2024, 15:43
requested review from @alexander-haller
In GitLab by @project_994_bot_1c5bd6ac1fdbd740fbc4ed080ecff58d on Jun 13, 2024, 16:56
added 1 commit
In GitLab by @project_994_bot_1c5bd6ac1fdbd740fbc4ed080ecff58d on Jun 13, 2024, 17:06
added 1 commit
approved this merge request
In GitLab by @project_994_bot_1c5bd6ac1fdbd740fbc4ed080ecff58d on Jun 13, 2024, 21:22
added 1 commit
In GitLab by @mhxion on Jun 13, 2024, 21:26
Commit fd19b564 enables HTTP/2.
In GitLab by @mhxion on Jun 13, 2024, 15:43
Merges additional-http-client-parameters -> dev
This PR essentially adds three new arguments that can be passed to either of
get
,post
,patch
,delete
commands:--verify
,--timeout
,--headers
. This also completes one feature request from FDM workshop #20, and partially fixes #39.New CLI arguments to raw API commands
Mainly copypasta from
elapi get --help
.--verify: SSL certificates are verified for HTTPS requests by default. Passing
--verify False
will disable the verification. This can be useful during local development. You can also pass a path to SSL certificate (a.k.a CA bundle) file to--verify
.--timeout: Maximum number of seconds elAPI will wait for response before giving up. Default timeout is 5 seconds.
--headers: elapi decides the appropriate headers in most cases.
--headers
will let you overwrite the default headers sent. The value for--headers
should be in JSON format.Note: If one is using
--headers
, passing a bad header can result in a bad response. Though this is not mentioned in the CLI--help
.As part of the same change, elAPI's HTTP APIs will now support passing any arbitrary argument that HTTPX has support for its
get
,post
,patch
anddelete
.