Package com.nettoolkit.gatekeeper
Class ReportCaptchaAttemptRequest
java.lang.Object
com.nettoolkit.internal.request.BaseApiRequest
com.nettoolkit.internal.request.PutRequest
com.nettoolkit.gatekeeper.ReportCaptchaAttemptRequest
Request to report a CAPTCHA attempt by updating visit CAPTCHA status. Corresponds to endpoint
PUT /gatekeeper/visits/:visit_id/captcha.
Visit ID and CAPTCHA status are required.
If the visit did not have the "captcha" authorization, this request will throw an ApiException with a NOT_FOUND code.
Sample:
gatekeeperClient.newReportCaptchaAttemptRequest()
.visitId("5f3b7ffe-9740-4aa4-9c15-7fb3dc8df636")
.status(CaptchaStatus.SOLVED)
.send();
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPath()voidsend()Sends the request.status(CaptchaStatus status) Sets the CAPTCHA status.Sets the visit ID.Sets the visit ID.Methods inherited from class com.nettoolkit.internal.request.PutRequest
getHttpMethod, newHttpRequestBuilder, serializeParametersMethods inherited from class com.nettoolkit.internal.request.BaseApiRequest
getClient, getParameters, toHttpRequest, toString
-
Constructor Details
-
ReportCaptchaAttemptRequest
-
-
Method Details
-
getContentType
- Specified by:
getContentTypein classPutRequest
-
getPath
- Specified by:
getPathin classBaseApiRequest
-
visitId
Sets the visit ID. required- Parameters:
visitId- the visit ID- Returns:
- this
-
visitId
Sets the visit ID.- Parameters:
strVisitId- the visit ID as a string- Returns:
- this
- Throws:
IllegalArgumentException- if the string is not a valid UUID- See Also:
-
status
Sets the CAPTCHA status. This can either be SOLVED or FAILED. required- Parameters:
status- the CAPTCHA status- Returns:
- this
-
send
Sends the request.- Throws:
NetToolKitException
-