added content-type header to http_connection

This commit is contained in:
Daniel Larimer 2012-11-15 19:15:11 -05:00
parent 55b0daa8aa
commit 23f89f0655
2 changed files with 3 additions and 2 deletions

View file

@ -7,8 +7,8 @@ namespace fc {
class path; class path;
namespace ssh { namespace ssh {
namespace detail { namespace detail {
struct client_impl; class client_impl;
struct process_impl; class process_impl;
}; };
enum sftp_file_type { enum sftp_file_type {

View file

@ -74,6 +74,7 @@ http::reply connection::request( const fc::string& method,
fc::stringstream req; fc::stringstream req;
req << method <<" "<<url<<" HTTP/1.1\r\n"; req << method <<" "<<url<<" HTTP/1.1\r\n";
req << "Host: localhost\r\n"; req << "Host: localhost\r\n";
req << "Content-Type: application/json\r\n";
if( body.size() ) req << "Content-Length: "<< body.size() << "\r\n"; if( body.size() ) req << "Content-Length: "<< body.size() << "\r\n";
req << "\r\n"; req << "\r\n";
fc::string head = req.str(); fc::string head = req.str();