diff --git a/mcc/web/templates/about_api.html b/mcc/web/templates/about_api.html index e697395..a42e261 100644 --- a/mcc/web/templates/about_api.html +++ b/mcc/web/templates/about_api.html @@ -191,24 +191,36 @@
Note that you need to append an '@' to the beginning of the filename in the CURL request when using the file-upload option.
+
+ When requesting HTML or PDF output, be sure to specify an output file with -o. Otherwise the response body will be printed to the terminal instead of being saved to a file. You may also use -o for JSON responses if you want to save the output.
+
curl -L -F ACDD=on -F ACDD-version=1.3 -F file-upload=@/home/user/granule.nc -F response=json {{ homepage_url }}/check
-curl -L -F CF=on -F CF-version=1.7 -F file-upload=@/home/user/granule.nc -F response=html {{ homepage_url }}/check
-curl -L -F GDS2=on -F GDS2-parameter=L4 -F file-upload=@/home/user/granule.nc -F response=pdf {{ homepage_url }}/check
-
+ curl -L -F ACDD=on -F ACDD-version=1.3 -F file-upload=@/home/user/granule.nc -F response=json -o result.json {{ homepage_url }}/check
+curl -L -F CF=on -F CF-version=1.7 -F file-upload=@/home/user/granule.nc -F response=html -o result.html {{ homepage_url }}/check
+curl -L -F GDS2=on -F GDS2-parameter=L4 -F file-upload=@/home/user/granule.nc -F response=pdf -o result.pdf {{ homepage_url }}/check
+
- For large files, you may want to show progress and set longer timeouts: + For large files, you may want to show progress, set longer timeouts, and save the response to an output file:
curl -L --progress-bar --connect-timeout 300 --max-time 3600 --keepalive-time 3600 \
- -F ACDD=on -F ACDD-version=1.3 -F file-upload=@/home/user/granule.nc -F response=json {{ homepage_url }}/check
-
+ -F ACDD=on -F ACDD-version=1.3 -F file-upload=@/home/user/granule.nc -F response=json \
+ -o result.json {{ homepage_url }}/check
+
curl -L -v --progress-meter --connect-timeout 300 --max-time 3600 --keepalive-time 3600 \
- -F CF=on -F CF-version=1.7 -F file-upload=@/home/user/granule.nc -F response=html {{ homepage_url }}/check
-
+ -F CF=on -F CF-version=1.7 -F file-upload=@/home/user/granule.nc -F response=html \
+ -o result.html {{ homepage_url }}/check
+
+ curl -L --progress-bar --connect-timeout 300 --max-time 3600 --keepalive-time 3600 \
+ -F GDS2=on -F GDS2-parameter=L4 -F file-upload=@/home/user/granule.nc -F response=pdf \
+ -o result.pdf {{ homepage_url }}/check
+
-o <filename>: Save the response body to the specified file--progress-bar: Display a simple progress bar--progress-meter: Display detailed progress information-v: Verbose output showing request and response headers