flickrex v0.6.0 Flickrex.Request.HttpClient behaviour View Source
Specifies HTTP client behaviour.
The client must be able to handle multipart form-data. For photo uploads, the body will be a tuple with the following format:
{:multipart,
[
{"oauth_signature", "6WAWwg6NxMtMb8J/+vEaB6kH8Aw="},
{"oauth_consumer_key", "CONSUMER_KEY"},
{"oauth_nonce", "yOY1CvqgzOFaeeDr9lPCGgCfI14PFbTy"},
{"oauth_signature_method", "HMAC-SHA1"},
{"oauth_timestamp", "1518934770"},
{"oauth_version", "1.0"},
{"oauth_token", "TOKEN"},
# other upload params with the format {binary(), binary()}
{:file, "path/to/photo.jpg",
{"form-data", [{"name", "\"photo\""}, {"filename", "\"photo.jpg\""}]}, []}
]}
See Uploading Photos example from the Flickr API documentation.