Protocol
HelloCaptcha defines the HelloCaptcha protocol. The protocol is based on HTTP and passes the information using
JSON. The protocol covers the functions of HelloCaptcha service like:
- Ask for a new turing test id and return the embedding code.
- Return the image data for the Turing test instance.
- Ask for a new Turing test on user request.
- Check whetheran answer is correct.
If an error occurs on the server side (for example: the supplied profile id is not valid) the server answers an exception. The answer of HelloCaptcha server can have two type. The type depends on the calling context. The two types are: HelloCaptcha record and raw data. Raw data means for example an animated GIF image.
HelloCaptcha record is a bit sophisticated. The record consitsts of two parts. The first part is the return value of the called function. The second part is an exception. Both parts must not be empty.