当前位置: 代码迷 >> PHP >> Content-Type:application/json 如何用啊高手过来看看。多谢
  详细解决方案

Content-Type:application/json 如何用啊高手过来看看。多谢

热度:14   发布时间:2016-04-28 17:02:09.0
Content-Type:application/json 怎么用啊。高手过来看看。谢谢!

求高手指点一下, 我这样的代码,这个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">&nbsp;</td>
       <td width="84%" height="20">  <input type="submit" name="submit" value="发布"></td>
     </tr>
   </table>
   
 </form>
 </body>
 </html>
------解决思路----------------------
用 ajax 提交,这样就可附加你需要的头
  相关解决方案