request.setMethod(accessorInfo.getHttpMethod().toString()); if (accessorInfo.getHttpMethod() == HttpMethod.POST) { request.setHeader("Content-Type", OAuth.FORM_ENCODED);
request.setMethod(accessorInfo.getHttpMethod().toString()); if (accessorInfo.getHttpMethod() == HttpMethod.POST) { request.setHeader("Content-Type", OAuth.FORM_ENCODED);
request.setMethod(accessorInfo.getHttpMethod().toString()); request.setSecurityToken( new AnonymousSecurityToken( "", 0L, this.realRequest.getSecurityToken().getAppUrl())); if (accessorInfo.getHttpMethod() == HttpMethod.POST) {
private HttpRequest createRequestTokenRequest(OAuthAccessor accessor) throws OAuthRequestException { if (accessor.consumer.serviceProvider.requestTokenURL == null) { throw new OAuthRequestException(OAuthError.BAD_OAUTH_TOKEN_URL, "request token"); } HttpRequest request = new HttpRequest( Uri.parse(accessor.consumer.serviceProvider.requestTokenURL)); request.setMethod(accessorInfo.getHttpMethod().toString()); if (accessorInfo.getHttpMethod() == HttpMethod.POST) { request.setHeader("Content-Type", OAuth.FORM_ENCODED); } request.setSecurityToken( new AnonymousSecurityToken( "", 0L, this.realRequest.getSecurityToken().getAppUrl())); return request; }
private HttpRequest createRequestTokenRequest(OAuthAccessor accessor) throws OAuthRequestException { if (accessor.consumer.serviceProvider.requestTokenURL == null) { throw new OAuthRequestException(OAuthError.BAD_OAUTH_TOKEN_URL, "request token"); } HttpRequest request = new HttpRequest( Uri.parse(accessor.consumer.serviceProvider.requestTokenURL)); request.setMethod(accessorInfo.getHttpMethod().toString()); if (accessorInfo.getHttpMethod() == HttpMethod.POST) { request.setHeader("Content-Type", OAuth.FORM_ENCODED); } return request; }
private HttpRequest createRequestTokenRequest(OAuthAccessor accessor) throws OAuthRequestException { if (accessor.consumer.serviceProvider.requestTokenURL == null) { throw new OAuthRequestException(OAuthError.BAD_OAUTH_TOKEN_URL, "request token"); } HttpRequest request = new HttpRequest( Uri.parse(accessor.consumer.serviceProvider.requestTokenURL)); request.setMethod(accessorInfo.getHttpMethod().toString()); if (accessorInfo.getHttpMethod() == HttpMethod.POST) { request.setHeader("Content-Type", OAuth.FORM_ENCODED); } return request; }