uhd-urz / elAPI

An extensible API client for eLabFTW
GNU Affero General Public License v3.0
5 stars 0 forks source link

Additional HTTP arguments (e.g., --timeout) are not gloabl #47

Closed alexander-haller closed 4 months ago

alexander-haller commented 5 months ago

In GitLab by @mhxion on Jun 15, 2024, 13:23

I just realized, having --timeout, --verify and --headers arguments only available to get, post, patch and delete doesn't solve the problem, because plugins are not taking those arguments into account! So, while get in elapi get experiments --timeout 10 will listen to the --timeout 10, experiments plugin in elapi experiments get --id <experiment ID> will still use the default timeout and just has no support for --timeout. In other words, --timeout, --verify and --headers are not global when they should be. They can be global if they are part of the elapi.yml configuration like enable_http2. But then we will need some way to overwrite them from the command line. This is something @alexander-haller have suggested before.

alexander-haller commented 5 months ago

In GitLab by @mhxion on Jun 15, 2024, 13:55

Actually, it doesn't make sense to move headers to elapi.yml, only timeout and verify, since --headers values would be request specific.

alexander-haller commented 5 months ago

In GitLab by @mhxion on Jun 23, 2024, 16:35

marked the checklist item Move timeout, verify, headers to elapi.yml. as completed

alexander-haller commented 5 months ago

In GitLab by @mhxion on Jun 23, 2024, 16:35

marked the checklist item Introduce a global argument that similar to Ansible's --extra-vars/-e allows override any configuration setting. as completed