Mediaflux Plugin Development: Create dataset from HTTP URL (with Basic Auth)

The example shows how to create a dataset asset from a password protected URL (Basic HTTP Auth).

Java: HTTP GET data from URL (with basic HTTP Auth)

The example shows how to do HTTP GET to download a file from URL. It also include an example to call Mediaflux client api to create a dataset from the url by piping the streams.

encode Base64 string in command line

  • Encode base64 string:
    echo -n Secret | base64
  • Decode base64 string:
    echo -n U2VjcmV0 | base64 -D


When encoding, -n must be specified. otherwise, a newline character will always be appended, which will cause unexpected result.