[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$fjhhuxeHh8COyl3H7OwYPJ9lNfscBrk7tjxqbHcqSrn0":3},{"answer":4,"createTime":5,"id":6,"options":7,"origin":10,"question":17,"related":18,"source":24,"type":25},[],"2026-04-28 15:29:39",353684000,[8,9],"正确","错误",{"count":11,"courseId":12,"courseImg":13,"courseName":14,"workId":15,"workName":16},10,"53e1d2ef4961cca8eea3e23969ad2cb9","https:\u002F\u002Ftihai-oss-cloud.itihey.com\u002Fimg\u002F03a579384a6dc297c89809b582fcc767.png","默认课程","work_52371790","GET和POST请求","GET 请求可以通过 c.Query(&quot;key&quot;) 获取 URL 问号后面的参数",[19,26,31,36,39,44,49,54,59,64],{"answer":20,"createTime":5,"id":21,"options":22,"question":23,"source":24,"type":25},[],353683997,[8,9],"在 Gin 中,r.GET(&quot;\u002Fuser&quot;, UserHandler) 只能处理 GET 类型的请求","v1",3,{"answer":27,"createTime":5,"id":28,"options":29,"question":30,"source":24,"type":25},[],353683998,[8,9],"表单提交一般使用 POST 请求,不建议用 GET 提交敏感数据",{"answer":32,"createTime":5,"id":33,"options":34,"question":35,"source":24,"type":25},[],353683999,[8,9],"r.POST(&quot;\u002Flogin&quot;) 可以通过浏览器地址栏直接访问并正常执行",{"answer":37,"createTime":5,"id":6,"options":38,"question":17,"source":24,"type":25},[],[8,9],{"answer":40,"createTime":5,"id":41,"options":42,"question":43,"source":24,"type":25},[],353684001,[8,9],"POST 表单数据只能用 c.Param() 获取,不能用 c.PostForm()",{"answer":45,"createTime":5,"id":46,"options":47,"question":48,"source":24,"type":25},[],353684002,[8,9],"在 Gin 里,GET 和 POST 可以绑定同一个 URL 路径",{"answer":50,"createTime":5,"id":51,"options":52,"question":53,"source":24,"type":25},[],353684003,[8,9],"c.Param(&quot;id&quot;) 用于获取 \u002Fuser\u002F:id 这种路径里的参数,GET\u002FPOST 都能用",{"answer":55,"createTime":5,"id":56,"options":57,"question":58,"source":24,"type":25},[],353684004,[8,9],"浏览器刷新页面、地址栏访问、a 标签默认跳转都是 GET 请求",{"answer":60,"createTime":5,"id":61,"options":62,"question":63,"source":24,"type":25},[],353684005,[8,9],"form 表单如果不写 method,默认就是 POST 请求",{"answer":65,"createTime":5,"id":66,"options":67,"question":68,"source":24,"type":25},[],353684006,[8,9],"在 Gin 中,POST 请求无法使用模板渲染 c.HTML()"]