求高手指点一下, 我这样的代码,这个Content-Type:application/json到底咋弄呢。谢谢!
POST请求请在HTTP Header中设置 Content-Type:application/json
怎么把下面的代码改成符合Content-Type:application/json?????
请高手帮忙指导一下啊。。。。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>测试</title>
</head>
<body>
<form action="https://oapi.dingtalk.com/department/create?access_token=e02222" method="post" name="form1" onSubmit="return doCheck();">
<table width="24%" align="center" border="1" cellspacing="0" cellpadding="1" >
<tr class="lanyuss">
<td height="35">大部门:</td>
<td height="35"><input type="text" id="1" name="parentid" maxlength="30" size="30" value="1"/></td>
</tr>
<tr class="lanyuss">
<td height="20">子部门:</td>
<td height="35"><input type="text" name="name" maxlength="30" size="30" value="2222"/></td>
</tr>
<tr class="lanyuss">
<td width="16%" height="20"> </td>
<td width="84%" height="20"> <input type="submit" name="submit" value="发布"></td>
</tr>
</table>
</form>
</body>
</html>
------解决思路----------------------
用 ajax 提交,这样就可附加你需要的头