![]() |
VCV Rack API
v1
|
Networking functions for HTTP requests, URLs, and downloads. More...
Enumerations | |
enum | Method { METHOD_GET, METHOD_POST, METHOD_PUT, METHOD_DELETE } |
Functions | |
void | init () |
json_t * | requestJson (Method method, std::string url, json_t *dataJ) |
Requests a JSON API URL over HTTP(S), using the data as the query (GET) or the body (POST, etc) Caller must json_decref(). More... | |
bool | requestDownload (std::string url, const std::string &filename, float *progress) |
Returns true if downloaded successfully. More... | |
std::string | encodeUrl (const std::string &s) |
URL-encodes s More... | |
std::string | urlPath (const std::string &url) |
Gets the path portion of the URL. More... | |
Networking functions for HTTP requests, URLs, and downloads.
void rack::network::init | ( | ) |
json_t* rack::network::requestJson | ( | Method | method, |
std::string | url, | ||
json_t * | dataJ | ||
) |
Requests a JSON API URL over HTTP(S), using the data as the query (GET) or the body (POST, etc) Caller must json_decref().
bool rack::network::requestDownload | ( | std::string | url, |
const std::string & | filename, | ||
float * | progress | ||
) |
Returns true if downloaded successfully.
std::string rack::network::encodeUrl | ( | const std::string & | s | ) |
URL-encodes s
std::string rack::network::urlPath | ( | const std::string & | url | ) |
Gets the path portion of the URL.