AdPzazz Posted May 15, 2014 Report Share Posted May 15, 2014 Hello, All. I'm struggling a bit; any guidance is much appreciated! I can successfully launch btsync /config sync.conf with login, password and api_key via my application. And I can submit a simple request (get_version) via HTTP POST and receive a 200 status response (assuming this means success). However, GetAllResponseHeaders returns the following:(see below) instead of the JSON response expected and shown in the API documentation ({ "version": "1.3.94" }) Returned Results: Connection: Keep-Alive Date: Thu, 15 May 2014 14:22:15 GMT Keep-Alive: timeout=5, max=99 Content-Length: 594 Content-Type: text/html Server: Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 X-Powered-By: PHP/5.3.8 I've looked several places for assistance using HTTP, POST/GET format, but can not find the magic solution. is there a switch somewhere that needs to be set so that plain text is returned? My assumption is that I can control adding folders, files, setting secrets, etc from within the app using the API functionality; just missing how to handle returned results. Again, thanks for any direction! Quote Link to comment Share on other sites More sharing options...
delegatevoid Posted May 20, 2014 Report Share Posted May 20, 2014 When you try to request the following resource (using your browser for example): http://127.0.0.1:8888/api?method=get_version This is assuming you are testing on the localhost, otherwise modify the addressYou may also have to modify the port, check your config file for details. Do you get valid JSON data or not? If not, the configuration file may be invalid. Quote Link to comment Share on other sites More sharing options...
AdPzazz Posted May 20, 2014 Author Report Share Posted May 20, 2014 Appreciate the reply... Yes, I did all of my initial testing through the browser to understand what needs to be sent and what should be returned. The response via the browser is correct. May not be able to accomplish my initial goal (bury all sync efforts within a Windows desktop app.) with BTSync. Looked like it would have worked well. Again, thanks for the reply. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.