[关闭]
@fuyb1986 2017-05-18T06:47:31.000000Z 字数 468 阅读 586

图片验证码

冰橙课件


获取图片地址、 hashkey

hashkey 用来验证图片上数字、字母,这些数字、字母是 key;
(hashkey, key) 成对才能通过验证

Method and URL Structure

只能用 ajax 访问;

Method Resource URL Authorization
GET /api/captcha/refresh/ NO

Request Paramaters

Name Descript
image_url 图片地址
key hashkey

cURL Example

  1. curl -X GET -H "Conent-Type: application/json" -H "X-Requested-With: XMLHttpRequest" http://localhost/api/captcha/refresh/

Response

  1. {
  2. "image_url": "/captcha/image/5d8a9834e64ce134845d69b715b78cf89fed9226/",
  3. "key": "5d8a9834e64ce134845d69b715b78cf89fed9226"
  4. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注