mirror of https://github.com/vitalif/grive2
Fix some compilation issues.
parent
b0c0353fdb
commit
6157dc57f3
|
@ -23,6 +23,7 @@
|
||||||
#include "Json.hh"
|
#include "Json.hh"
|
||||||
|
|
||||||
#include "http/CurlAgent.hh"
|
#include "http/CurlAgent.hh"
|
||||||
|
#include "http/Header.hh"
|
||||||
#include "util/log/Log.hh"
|
#include "util/log/Log.hh"
|
||||||
|
|
||||||
// for debugging
|
// for debugging
|
||||||
|
@ -62,9 +63,10 @@ void OAuth2::Auth( const std::string& auth_code )
|
||||||
|
|
||||||
http::JsonResponse resp ;
|
http::JsonResponse resp ;
|
||||||
http::CurlAgent http ;
|
http::CurlAgent http ;
|
||||||
|
http::Header hdr ;
|
||||||
|
|
||||||
DisableLog dlog( log::debug ) ;
|
DisableLog dlog( log::debug ) ;
|
||||||
http.Post( token_url, post, &resp ) ;
|
http.Post( token_url, post, &resp, hdr ) ;
|
||||||
|
|
||||||
Json jresp = resp.Response() ;
|
Json jresp = resp.Response() ;
|
||||||
m_access = jresp["access_token"].Str() ;
|
m_access = jresp["access_token"].Str() ;
|
||||||
|
@ -99,9 +101,10 @@ void OAuth2::Refresh( )
|
||||||
|
|
||||||
http::JsonResponse resp ;
|
http::JsonResponse resp ;
|
||||||
http::CurlAgent http ;
|
http::CurlAgent http ;
|
||||||
|
http::Header hdr ;
|
||||||
|
|
||||||
DisableLog dlog( log::debug ) ;
|
DisableLog dlog( log::debug ) ;
|
||||||
http.Post( token_url, post, &resp ) ;
|
http.Post( token_url, post, &resp, hdr ) ;
|
||||||
|
|
||||||
m_access = resp.Response()["access_token"].Str() ;
|
m_access = resp.Response()["access_token"].Str() ;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue