Java写 http+json的接口 求大神帮忙啊
请求URI :https://{ServerRoot}/location/startTask/v1
Host: {ServerRoot}
Accept: application/json
Content-Length: 50
Content-Type: application/json
Authorization: WSSE realm="SDP", profile="UsernameToken", type="Appkey"
X-WSSE: UsernameToken Username="bob", PasswordDigest="weYI3nXd8LjMNVksCKFV8t3rgHh3Rw==", Nonce="WScqanjCEAC4mQoBE07sAQ==", Created="2009-03-24T12:30:04Z"
{
"filterType": 1,
"filterPosiList": [
{
"type": 1,
"dimeOne": "1",
"dimeTwo": "1"
}
],
"shareType": 1
}
JSON格式的正常响应消息示例如下:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 553
{
"code":"000000",
"description":"ok",
"taskId":"000000001"
}
JSON格式的异常响应消息示例如下:
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 69
{
"code":"E000099",
"description":"Unknown Error"
}
怎么写接口啊