...
Testing
Testing conversion on dap-dev
- Commands:
Send the conversion request:
curl http://browndog.user:password1@dap-dev.ncsa.illinois.edu:8184/convert/jpg/http%3A%2F%2Fbrowndog.ncsa.illinois.edu%2Fexamples%2Fbrowndog.pngGet the converted file:
curl -u browndog.user:password1 -O http://dap-dev.ncsa.illinois.edu:8184/file/200598567_browndog.jpg
- Used a png to test.
http://browndog.ncsa.illinois.edu/examples/browndog.png
The converion URL requires an escaped URL.
To generate an escaped URL using perl:
perl -e 'use URI::Escape; print uri_escape("http://browndog.ncsa.illinois.edu/examples/browndog.png")'
http://www.perlhowto.com/encode_and_decode_url_strings
man URI::Escape Bi-hourly tests.py
On dap-dev in /var/www/html/dap/tests/. It used the Polyglot GET API
using the URL to convert, got a returned URL, then downloaded that URL to
"tmp/<count>_<file_basename>.<output_format>", then checked
whether that file existed and was not empty.
Python requests:
r = requests.get(api_call, auth=(username, password),
headers=headers, timeout=timeout)
result = r.text
contains only the text, not the HTML tags.
That is, the actual content returned is:
<a href=http://dap-dev.ncsa.illinois.edu:8184/file/200598567_browndog.jpg>http://dap-dev.ncsa.illinois.edu:8184/file/200598567_browndog.jpg</a>
but result is only:
http://dap-dev.ncsa.illinois.edu:8184/file/200598567_browndog.jpg
python requests API:
http://docs.python-requests.org/en/master/api/
Restlet Documentation
In pom.xml: org.restlet 2.3.1.
- User guide.
https://restlet.com/technical-resources/restlet-framework/guide/2.3
Resource package Overview:
https://restlet.com/technical-resources/restlet-framework/guide/2.3/core/resource/overview
Annotation Get.
https://restlet.com/technical-resources/restlet-framework/javadocs/2.1/jse/api/org/restlet/resource/Get.html
Response: redirectTemporary. Used in url redirection.
https://restlet.com/technical-resources/restlet-framework/javadocs/2.1/jse/api/org/restlet/Response.html
https://restlet.com/technical-resources/restlet-framework/javadocs/2.1/jee/api/org/restlet/resource/ServerResource.htm
- User guide.
Installation of Required Software Packages on Ubuntu Trusty (14.04)
...