我是一個給定的REST批處理作業的狀態,與此API調用應該爲批處理作業提供什麼HTTP響應代碼和標題?
GET https://xxx.egnyte.com/pubapi/v1/audit/jobs/1381774131181 HTTP/1.1
Authorization: Bearer 3ysd8zxxxxxxxxxx
Content-Type: application/json
Host: xxx.egnyte.com
Connection: Keep-Alive
HTTP響應輪詢是這樣的:
HTTP/1.1 303 See Other
Date: Mon, 14 Oct 2013 18:12:29 GMT
Server: Mashery Proxy
Set-Cookie: EGNYTE-MARKETING-SESSION-COOKIE=1; path=/; domain=egnyte.com
Set-Cookie: X-Egnyte-Subdomain=xxx; path=/; domain=egnyte.com; expires=Tue, 14-Oct-2014 18:12:29 GMT
X-Mashery-Responder: avl-mashery-master
Location: https://haproxy:7180/public-api/v1/audit/logins/1381774131181
Content-Type: application/json;charset=UTF-8
P3P: CP="NOI DSP COR NID CUR TAIa OUR NOR" policyref="/w3c/p3p.xml"
Set-Cookie: EGNYTE-MARKETING-COOKIE=22.22.186.9.138333333885; path=/; expires=Tue, 14-Oct-14 18:12:29 GMT; domain=.egnyte.com
Set-Cookie: JSESSIONID=1333398F4E959E33333F2EA0DB1.avl-app17_6280; Path=/; Secure; HttpOnly
X-Robots-Tag: none
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
16
{"status":"completed"}
0
.NET似乎是由這種反應所迷惑,和問題以下內容:
顯然.NET沒有看到上面的HTTP 303,而不是報告一個502通過查看位置URL,這是從互聯網客戶端不可用。
問題
什麼都應該對這個HTTP響應呢? (我正在輪詢狀態,應該更改或刪除什麼?)
如何讓.NET可以很好地播放,以便我可以提取嵌入代碼中的JSON?