summaryrefslogtreecommitdiffabout
path: root/test
Side-by-side diff
Diffstat (limited to 'test') (more/less context) (ignore whitespace changes)
-rw-r--r--test/test-oauth-consumer.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/test/test-oauth-consumer.cc b/test/test-oauth-consumer.cc
index c5a0fc0..b3ddef5 100644
--- a/test/test-oauth-consumer.cc
+++ b/test/test-oauth-consumer.cc
@@ -29,33 +29,29 @@ int main(int,char**) {
opkele::oauth::token_t( "key","secret" ) );
opkele::oauth::token_t rt = sc.get_request_token();
cout << "Request token: " << rt << endl;
cout << "Authorize URL: " << sc.get_authorize_url(rt) << endl;
opkele::oauth::token_t at = sc.get_access_token(rt);
cout << "Access token: " << at << endl;
opkele::fields_t test;
test.set_field("foo","bar");
opkele::util::curl_pick_t curl = opkele::util::curl_t::easy_init();
opkele::oauth::http_request_t hr("POST",
"http://term.ie/oauth/example/echo_api.php");
- sc.prepare_request(hr,
- opkele::fields_t(),test,
- opkele::oauth::oauth_auth_header,"HMAC-SHA1",
- &at,"realm");
CURLcode r = curl.misc_sets();
r || (r=curl.set_write());
if(r)
throw opkele::exception_curl(OPKELE_CP_ "failed to set curly options",r);
- hr.setup_curl(curl);
+ sc.prepare_request(hr,opkele::fields_t(),test,&at).setup_curl(curl);
if( (r=curl.easy_perform()) )
throw opkele::exception_curl(OPKELE_CP_ "failed to perform curly request",r);
cout << "Response: " << curl.response << endl;
#ifdef OPKELE_HAVE_KONFORKA
}catch(konforka::exception& e) {
cerr
<< "oops, caught " << opkele::util::abi_demangle(typeid(e).name()) << endl
<< " what: " << e.what() << endl
<< " where: " << e.where() << endl;
if(!e._seen.empty()) {
cerr << " seen:" << endl;