Hello.
I am barely starting with the dropbox api v2 to make requests to my dropbox account. However, i have a problem with all requests made in my server. I can make functioning requests on JSFiddle by normal ajax http request or with dbx javascript used on the offical documents, this is the example: http://jsfiddle.net/3nfz9fc4/ You can check the object outcomes in console log.
Nevertheless, using the SAME CODE (having specified by the same way the access token and headers if needed), if i try to make ANY request on my server or localhost i get the following:
{status: 400, error: "Error in call to API function "files/list_folder": request body: could not decode input as JSON", response: c}
inside response object, somewhere below the rainbow:
error:Error: cannot POST https://api.dropboxapi.com/2/files/list_folder (400)
The only thing on my mind i got is that is like it could not detect anything written on the body of the request, and therefore it cant detect the {"path":""} JSON, but i am not even sure about it.
Why do the requests both with ajax and dbx work in JSFiddle page but not in my server, localhost, or chrome console (with script src linked)?