Skip to content

Instantly share code, notes, and snippets.

@NetworksAreMadeOfString
Created June 9, 2012 23:11
Show Gist options
  • Save NetworksAreMadeOfString/2902966 to your computer and use it in GitHub Desktop.
Save NetworksAreMadeOfString/2902966 to your computer and use it in GitHub Desktop.
Headers.add(new BasicNameValuePair("Accept","application/json"));
Headers.add(new BasicNameValuePair("Content-Type","application/json"));
Headers.add(new BasicNameValuePair("X-Ops-Sign","version=1.0"));
Headers.add(new BasicNameValuePair("X-Ops-Userid",this.ClientName));
Headers.add(new BasicNameValuePair("X-Ops-Timestamp",TimeStamp));
Headers.add(new BasicNameValuePair("X-Ops-Content-Hash",Disgesteriser.hash_string(Body)));
signed_canonicalize_request = SignHeaders("Method:GET"+
"\nHashed Path:" + Disgesteriser.hash_string(Path) +
"\nX-Ops-Content-Hash:"+Disgesteriser.hash_string(Body)+
"\nX-Ops-Timestamp:"+TimeStamp+
"\nX-Ops-UserId:"+this.ClientName);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment