Bootstrap Table 发送Header的Content Type设置

http 协议Header里的Content-Type有以下三种方式:
1,application/x-www-form-urlencoded:数据编码为名称/值对,这是标准的编码格式。
2,multipart/form-data: 数据被编码为一条消息,每个控件对应消息中的一个部分。
3,text/plain: 数据以纯文本形式进行编码。
Bootstrap Table通过contentType属性设置,发送数据编码方式。

<table
  id="table"
  data-toggle="table"
  data-height="460"
  data-content-type="application/x-www-form-urlencoded"
  data-url="json/data1.json">
  <thead>
    <tr>
      <th data-field="id">ID</th>
      <th data-field="name">Item Name</th>
      <th data-field="price">Item Price</th>
    </tr>
  </thead></table>

另外一种设置方式

    //bootstrap table初始化数据
        $('#table').bootstrapTable({
            columns: columns,
            data: getData(),
            contentType :"application/x-www-form-urlencoded",
            height:400  //这里就是固定表头的设置
        });