Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Removing oauth_token from request header in Scribe
- public class TestImporter {
- private static final String REQ_URL = "http://test.com/";
- private static final String KEY = "KEY";
- private static final String SECRET = "SECRET";
- // test variables
- private static final String VAR1 = "Test123";
- public static void main(String[] args) {
- OAuthService service = new ServiceBuilder()
- .provider(TestAPI.class)
- .apiKey(KEY)
- .apiSecret(SECRET)
- .build();
- Token token = new Token("", "");
- OAuthRequest request = new OAuthRequest(Verb.GET, REQ_URL + VAR1 + "/");
- service.signRequest(token, request);
- Response response = request.send();
- System.out.println(response.getBody());
- }
- }
- ServiceBuilder()
- .provider(TestAPI.class)
- .apiKey(KEY)
- .apiSecret(SECRET)
- .signatureType(SignatureType.QueryString)
- .build();
Advertisement
Add Comment
Please, Sign In to add comment