{ "code": "10000", "charge": false, "msg": "查询成功", "result": { "status": "0", "msg": "ok", "result": { "total": "950", "pagenum": "1", "pagesize": "3", "subject": "1", "type": "C1", "sort": "normal", "list": [{ "question": "未取得驾驶证的学员在道路上学习驾驶技能,下列哪种做法是正确的?", "option1": "A、使用所学车型的教练车由教练员随车指导", "option2": "B、使用所学车型的教练车单独驾驶学习", "option3": "C、使用私家车由教练员随车指导", "option4": "D、使用所学车型的教练车由非教练员的驾驶人随车指导", "answer": "A", "explain": "《公安部令第123号》规定:未取得驾驶证的学员在道路上学习驾驶技能,使用所学车型的教练车由教练员随车指导。", "pic": "", "type": "C1,C2,C3" }, { "question": "在实习期内驾驶机动车的,应当在车身后部粘贴或者悬挂哪种标志?", "option1": "A、注意新手标志", "option2": "B、注意避让标志", "option3": "C、统一式样的实习标志", "option4": "D、注意车距标志", "answer": "C", "explain": "《公安部令第123号》第六十四条规定:在实习期内驾驶机动车的,应当在车身后部粘贴或者悬挂统一式样的实习标志。", "pic": "", "type": "C1,C2,C3" }, { "question": "机动车驾驶人在实习期内驾驶机动车不得牵引挂车。", "option1": "", "option2": "", "option3": "", "option4": "", "answer": "对", "explain": "《公安部令第123号》第六十五条规定:机动车驾驶人在实习期内不得驾驶公共汽车、营运客车或者执行任务的警车、消防车、救护车、工程救险车以及载有爆炸物品、易燃易爆化学物品、剧毒或者放射性等危险物品的机动车;驾驶的机动车不得牵引挂车。", "pic": "", "type": "C1,C2,C3" }] } } }
<?php /** * Created by PhpStorm. * User: FZS * Time: 2021/01/01 21:26 */ class freeApi { private $apiUrl; public function __construct() { $this->apiUrl = ' https://way.jd.com/jisuapi/driverexamQuery?type=c1&subject=1&pagesize=20&pagenum=1&sort=normal&appkey=key'; } /** * 获取结果 * @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/jisuapi/driverexamQuery?type=c1&subject=1&pagesize=20&pagenum=1&sort=normal&appkey=key" ) 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)) }