关于beego框架 controller GetString获取参数失败
2020-04-16 16:25 StevenZhao 阅读(1082) 评论(0) 收藏 举报问题描述:在注册页面逻辑实现是,时时无法获取页面的填写的注册信息,查找许多资料终于解决;
<form class="login_form" name = "login" method="post" action="/register" content="application">
<h1 class="login_title">用户注册</h1>
<input type="text" placeholder="用户名" class="input_txt" name="userName">
<input type="password" placeholder="密码" class="input_txt" name = "password">
<input type="submit" value="注 册" class="input_sub">
</form>
因为客户端发送请求的content-type为 text/plain,最后是把发送请求的content-type 改成了 application/x-www-form-urlencoded最终问题迎刃而解
每天的价值就是不停息的前进!!!
浙公网安备 33010602011771号