diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-05-29 21:07:31 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-05-29 21:13:14 +0200 |
commit | 1ed866d31ddeec5ab484760bada2355bbf49c698 (patch) | |
tree | a278178ed8bc71f7349d1afce16cca2c798b7181 /requests_examples.sh | |
parent | rest-api: handle payloads with an api_key (diff) | |
download | fs-tracer-backend-1ed866d31ddeec5ab484760bada2355bbf49c698.tar.gz fs-tracer-backend-1ed866d31ddeec5ab484760bada2355bbf49c698.tar.bz2 fs-tracer-backend-1ed866d31ddeec5ab484760bada2355bbf49c698.zip |
rest-api: Take file path in query params
Diffstat (limited to 'requests_examples.sh')
-rwxr-xr-x | requests_examples.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/requests_examples.sh b/requests_examples.sh index 45ef59d..616e625 100755 --- a/requests_examples.sh +++ b/requests_examples.sh @@ -1,5 +1,12 @@ #!/bin/sh -curl -H "API_KEY: ${API_KEY}" -X POST -d '{"timestamp": "2017-01-02T15:04:05Z"}' http://leunam.dev:9999/file/ +curl -H "API_KEY: ${API_KEY}" -X POST -d ' +{ + "timestamp": "2020-01-02T15:04:05Z", + "absolute_path": "/home/user/file.txt", + "contents": "Hello, World!" +} +' http://leunam.dev:9999/file/ + +curl -H "API_KEY: ${API_KEY}" -X GET http://leunam.dev:9999/file/?path=%2Fhome%2Fuser%2Ffile.txt -curl -H "API_KEY: ${API_KEY}" -X GET http://leunam.dev:9999/file/ |