1. 程式人生 > >hppt post請求 請教大神解脫

hppt post請求 請教大神解脫

問題:我想用 tcp協議 傳送post資料(請求如下)到伺服器自己定義的簡單接收介面中,發現無法傳如陣列 請教



POST /devices/23854678/datapoints HTTP/1.1

api-key:w7HiwDCJE=E8YVTg8dFQYGWzHpE=
Host:api.heclouds.com
Connection:
Content-Length:142


{"datastreams":[{"id":"X","datapoints":[{"value":9.25}]},{"id":"Y","datapoints":[{"value":0.26}]},{"id":"Z","datapoints":[{"value":369.76}]}]}



只能傳輸大哥資料請教傳送的post如下

POST /wxfront/m/runingInfo/addRuningInfoExt.do HTTP/1.1
Content-Type:application/x-www-form-urlencoded; 
charset=utf-8
Accept:*/*
Host:101.201.141.226
Content-Length:18

Connection:close


index=23423423&temp=11

除去報頭換成json無法正常傳輸   求解