uhd-urz / elAPI

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

Add file path support for --OC, --data, --query, --headers, --file - [merged] #112

Closed alexander-haller closed 1 month ago

alexander-haller commented 1 month ago

In GitLab by @mhxion on Jul 1, 2024, 01:14

Merges file-support-for-json -> dev

A JSON or YAML file path now can be passed to --OC, --data, --query, --headers, --file. This can especially helpful for sending --data.

$ cat ~/quick-config.yml
timeout: 120

$ elapi --OC '{"timeout": 120}' get info
<Response>

$ elapi --OC ~/quick-config.yml get info
<Response>

$ cat ~/custom-headers.yaml
User-Agent: "My custom agent 1.0"
Accept: "application/json"

$ elapi get --headers ~/custom-headers.yaml info
<Response>
alexander-haller commented 1 month ago

In GitLab by @mhxion on Jul 1, 2024, 01:14

requested review from @alexander-haller

alexander-haller commented 1 month ago

In GitLab by @project_994_bot_b374c38ac3876b25bf742bcc52b2e442 on Jul 1, 2024, 01:20

added 1 commit

Compare with previous version

alexander-haller commented 1 month ago

In GitLab by @project_994_bot_b374c38ac3876b25bf742bcc52b2e442 on Jul 1, 2024, 01:45

added 1 commit

Compare with previous version

alexander-haller commented 1 month ago

In GitLab by @project_994_bot_b374c38ac3876b25bf742bcc52b2e442 on Jul 1, 2024, 02:00

added 1 commit

Compare with previous version

alexander-haller commented 1 month ago

In GitLab by @project_994_bot_b374c38ac3876b25bf742bcc52b2e442 on Jul 1, 2024, 02:06

added 1 commit

Compare with previous version

alexander-haller commented 1 month ago

approved this merge request