[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f0vTthvszqjgfmRPzPcvV53bAUWToNZfY2uHj_mtjrFw":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",353684005,[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请求","form 表单如果不写 method,默认就是 POST 请求",[19,26,31,36,41,46,51,56,61,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":38,"options":39,"question":40,"source":24,"type":25},[],353684000,[8,9],"GET 请求可以通过 c.Query(&quot;key&quot;) 获取 URL 问号后面的参数",{"answer":42,"createTime":5,"id":43,"options":44,"question":45,"source":24,"type":25},[],353684001,[8,9],"POST 表单数据只能用 c.Param() 获取,不能用 c.PostForm()",{"answer":47,"createTime":5,"id":48,"options":49,"question":50,"source":24,"type":25},[],353684002,[8,9],"在 Gin 里,GET 和 POST 可以绑定同一个 URL 路径",{"answer":52,"createTime":5,"id":53,"options":54,"question":55,"source":24,"type":25},[],353684003,[8,9],"c.Param(&quot;id&quot;) 用于获取 \u002Fuser\u002F:id 这种路径里的参数,GET\u002FPOST 都能用",{"answer":57,"createTime":5,"id":58,"options":59,"question":60,"source":24,"type":25},[],353684004,[8,9],"浏览器刷新页面、地址栏访问、a 标签默认跳转都是 GET 请求",{"answer":62,"createTime":5,"id":6,"options":63,"question":17,"source":24,"type":25},[],[8,9],{"answer":65,"createTime":5,"id":66,"options":67,"question":68,"source":24,"type":25},[],353684006,[8,9],"在 Gin 中,POST 请求无法使用模板渲染 c.HTML()"]