public WebQuery GetQueryFor(string url, RestBase request, IWebQueryInfo info, WebMethod method) { return GetQueryForImpl(info); }
public WebQuery GetQueryFor(string url, RestBase request, IWebQueryInfo info, WebMethod method, bool enableTrace) { return GetQueryForImpl(info, enableTrace); }
private void SetQueryMetadata(IWebQueryInfo info) { Info = info; Headers = BuildRequestHeaders(); Parameters = BuildRequestParameters(); ParseUserAgent(); }
protected WebQueryBase(IWebQueryInfo info) { SetQueryMetadata(info); InitializeResult(); }
public BasicAuthWebQuery(IWebQueryInfo info) : base(info) { }
public BasicAuthWebQuery(IWebQueryInfo info, string username, string password) : this(info) { _username = username; _password = password; }
public WebQuery GetQueryFor(string url, WebParameterCollection parameters, IWebQueryInfo info, WebMethod method, bool enableTrace) { return(GetQueryForImpl(info, enableTrace)); }
public BasicAuthWebQuery(IWebQueryInfo info, string username, string password, bool enableTrace) : this(info, enableTrace) { _username = username; _password = password; }
public WindowsAuthWebQuery(ICredentials credentials, IWebQueryInfo info, bool enableTrace) : base(info, enableTrace) { _credentials = credentials; }
private WebQuery GetQueryForImpl(IWebQueryInfo info, bool enableTrace) { return new WindowsAuthWebQuery(_credentials, info, enableTrace); }
public virtual WebQuery GetQueryFor(string url, RestBase request, IWebQueryInfo info, WebMethod method, bool enableTrace) { var query = GetQueryFor(url, request.Parameters, info, method, enableTrace); request.Method = method; return query; }
public virtual WebQuery GetQueryFor(string url, WebParameterCollection parameters, IWebQueryInfo info, WebMethod method, bool enableTrace) { OAuthWebQueryInfo oauth; var workflow = new OAuthWorkflow { ConsumerKey = ConsumerKey, ConsumerSecret = ConsumerSecret, ParameterHandling = ParameterHandling, SignatureMethod = SignatureMethod, SignatureTreatment = SignatureTreatment, CallbackUrl = CallbackUrl, ClientPassword = ClientPassword, ClientUsername = ClientUsername, Verifier = Verifier, Token = Token, TokenSecret = TokenSecret, Version = Version ?? "1.0", SessionHandle = SessionHandle }; switch (Type) { case OAuthType.RequestToken: workflow.RequestTokenUrl = url; oauth = workflow.BuildRequestTokenInfo(method, parameters); break; case OAuthType.AccessToken: workflow.AccessTokenUrl = url; oauth = workflow.BuildAccessTokenInfo(method, parameters); break; case OAuthType.ClientAuthentication: method = WebMethod.Post; workflow.AccessTokenUrl = url; oauth = workflow.BuildClientAuthAccessTokenInfo(method, parameters); break; case OAuthType.ProtectedResource: oauth = workflow.BuildProtectedResourceInfo(method, parameters, url); oauth.FirstUse = true; break; default: throw new ArgumentOutOfRangeException(); } return new OAuthWebQuery(oauth, enableTrace); }
public WebQuery GetQueryFor(string url, RestBase request, IWebQueryInfo info, WebMethod method, bool enableTrace) { return(GetQueryForImpl(info, enableTrace)); }
public WebQuery GetQueryFor(string url, WebParameterCollection parameters, IWebQueryInfo info, WebMethod method, bool enableTrace) { return GetQueryForImpl(info, enableTrace); }
public WebQuery GetQueryFor(string url, WebParameterCollection parameters, IWebQueryInfo info, WebMethod method) { return GetQueryForImpl(info); }
private WebQuery GetQueryForImpl(IWebQueryInfo info, bool enableTrace) { return HasAuth ? new BasicAuthWebQuery(info, Username, Password, enableTrace) : new BasicAuthWebQuery(info, enableTrace); }
private WebQuery GetQueryForImpl(IWebQueryInfo info) { return HasAuth ? new BasicAuthWebQuery(info, Username, Password) : new BasicAuthWebQuery(info); }
public BasicAuthWebQuery(IWebQueryInfo info, bool enableTrace) : base(info, enableTrace) { }