pub struct GeetestRequest {
pub website_url: String,
pub gt: String,
pub version: GeetestVersion,
pub proxy: Option<ProxyInfo>,
pub geetest_api_server_subdomain: Option<String>,
pub geetest_get_lib: Option<String>,
pub user_agent: Option<String>,
}Expand description
GeeTest captcha (GeeTestTask), versions 3 and 4.
Fields§
§website_url: StringURL of the page where the captcha is initialized (for v3 usually the Referer of the
gettype.php request, which may differ from the URL in the address bar).
gt: StringThe gt key of the domain (for v4: the captcha_id).
version: GeetestVersionVersion-specific parameters.
proxy: Option<ProxyInfo>§geetest_api_server_subdomain: Option<String>GeeTest API server subdomain (must differ from api.geetest.com). May be required
for some sites.
geetest_get_lib: Option<String>Path to the captcha script used to display it on the page, sent as a JSON string. May be required for some sites.
user_agent: Option<String>Browser User-Agent (use a current Windows one).
Implementations§
Source§impl GeetestRequest
impl GeetestRequest
Sourcepub fn new_v3(
website_url: impl Into<String>,
gt: impl Into<String>,
challenge: impl Into<String>,
) -> Self
pub fn new_v3( website_url: impl Into<String>, gt: impl Into<String>, challenge: impl Into<String>, ) -> Self
GeeTest v3 request; challenge is required by the API for this version.
Sourcepub fn new_v4(website_url: impl Into<String>, gt: impl Into<String>) -> Self
pub fn new_v4(website_url: impl Into<String>, gt: impl Into<String>) -> Self
GeeTest v4 request without initParameters.
Sourcepub fn new_v4_with_init_parameters(
website_url: impl Into<String>,
gt: impl Into<String>,
init_parameters: Value,
) -> Self
pub fn new_v4_with_init_parameters( website_url: impl Into<String>, gt: impl Into<String>, init_parameters: Value, ) -> Self
GeeTest v4 request with initParameters (e.g. json!({"riskType": "slide"})).
pub fn with_proxy(self, proxy: ProxyInfo) -> Self
pub fn with_geetest_api_server_subdomain(self, value: impl Into<String>) -> Self
pub fn with_geetest_get_lib(self, value: impl Into<String>) -> Self
pub fn with_user_agent(self, value: impl Into<String>) -> Self
Trait Implementations§
Source§impl CaptchaRequest for GeetestRequest
impl CaptchaRequest for GeetestRequest
Source§fn timeouts(&self) -> GetResultTimeouts
fn timeouts(&self) -> GetResultTimeouts
Polling schedule recommended for this captcha type.
Source§impl Clone for GeetestRequest
impl Clone for GeetestRequest
Source§impl Debug for GeetestRequest
impl Debug for GeetestRequest
Auto Trait Implementations§
impl Freeze for GeetestRequest
impl RefUnwindSafe for GeetestRequest
impl Send for GeetestRequest
impl Sync for GeetestRequest
impl Unpin for GeetestRequest
impl UnsafeUnpin for GeetestRequest
impl UnwindSafe for GeetestRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more