{ "code": 0, "charge": false, "remainTimes": 4998, "remainSeconds": -1, "msg": "查询成功", "result": { "resultData": { "owner": "秦振敏", "address": "山东省东营市东营区史口镇木李村263号", "register_date": "2007-01-09", "vehicle_file_id": "370500008428", "type": "小型轿车", "total_weight": "1265kg", "capacity": "5人", "number": "鲁EBB503", "character": "非营运", "approved_weight": "", "issue_date": "2016-07-12", "size": "3550×1495×1530mm", "engine": "FG6L03542", "equip_weight": "890kg", "model": "奇瑞牌SQR7111S11", "vin": "LVVDB12A66D244265", "remarks": "", "tractive_tonnage": "" }, "message": "success", "request_id": "7643fdec7e8e1ad80db55d57faa98150", "code": 0 } }
<?php /** * Created by PhpStorm. * User: FZS * Time: 2021/05/01 15:26 */ class freeApi { private $apiUrl; public function __construct() { $this->apiUrl = 'https://way.jd.com/JDAI/ocr_vehicle_recognition?appkey=appkey&body=image'; } /** * 获取结果 * @return array */ public function getResult() { return file_get_contents($this->apiUrl); } }
package main import ( "fmt" "io/ioutil" "log" "net/http" ) const ( APIURL = "https://way.jd.com/JDAI/ocr_vehicle_recognition?appkey=appkey&body=image" ) func main() { queryUrl := fmt.Sprintf("%s",APIURL) resp, err := http.Get(queryUrl) if err != nil { log.Println(err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }