Note that there are some explanatory texts on larger screens.

plurals
  1. POerror when creating folder on dropbox via libcurl
    primarykey
    data
    text
    <p>I am trying to make a c++ application that uses Dropbox. When I am trying to create a new folder I take the following error: {"error": "Not Found"} and "HTTP/1.1 404 Not Found".</p> <p>I have followed the instruction of Dropbox's REST Api, so I have used the POST method. (I am not sure if I can use PUT, instead).</p> <p>Here is my code:</p> <pre><code>void createDirectory(const char *new_Directory_Path) </code></pre> <p>{ string create_Directory_Url = "<a href="https://api.dropbox.com/1/fileops/create_folder/sandbox/test_folder" rel="nofollow">https://api.dropbox.com/1/fileops/create_folder/sandbox/test_folder</a>";</p> <pre><code> CURL* curl = curl_easy_init(); if(!curl) { CURLcode res; struct curl_slist *headers = NULL; string my_header = "Authorization: OAuth oauth_version=\"1.0\", oauth_signature_method=\"PLAINTEXT\", oauth_consumer_key=\"" + m_consumer_key + "\", oauth_token=\"" + m_accessKey + "\", oauth_signature=\"" + m_consumer_secret + "&amp;" + m_accessSecret + "\""; headers = curl_slist_append(headers, my_header.c_str()); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); curl_easy_setopt(curl, CURLOPT_POST, 1L); curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0); curl_easy_setopt(curl, CURLOPT_URL, create_Directory_Url.c_str()); res = curl_easy_perform(curl); curl_slist_free_all(headers); curl_easy_cleanup(curl); } </code></pre> <p>}</p> <p>Please, does anyone have an idea about what am I doing wrong?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload