@@ -86,7 +86,7 @@ public Consumer getConsumer(List<ScopeElement> scope, String redirectURL) {
8686 * @throws Exception Occuring during the request
8787 */
8888 public String sendGetReq (String path , Consumer c ) throws Exception {
89- return sendReq (path , "GET" , c , null );
89+ return sendReq (path , "GET" , c , "" );
9090 }
9191
9292 /**
@@ -117,7 +117,7 @@ private String sendReq(String path, String method, Consumer c, String body) thro
117117 path = ep .getURL () + path ;
118118 long time = ts .getTime ();
119119 StringBuilder forSig = new StringBuilder ();
120- forSig .append (app .getPubKey ());
120+ forSig .append (app .getSecKey ());
121121 forSig .append ("+" );
122122 forSig .append (c .getConsumerKey ());
123123 forSig .append ("+" );
@@ -146,6 +146,12 @@ private String sendReq(String path, String method, Consumer c, String body) thro
146146 case "POST" :
147147 result = HttpRequests .sendPost (path , out , body , headers );
148148 break ;
149+ case "PUT" :
150+ result = HttpRequests .sendPut (path , out , body , headers );
151+ break ;
152+ case "DELETE" :
153+ result = HttpRequests .sendDelete (path , out , headers );
154+ break ;
149155 default :
150156 throw new IllegalArgumentException ("Incorrect HTTP method." );
151157 }
0 commit comments