我正在尝试登录一个应用程序,它有文本/html 和一些应用程序/json。我能够从上一个请求登录到应用程序,但我相信 json 正在加载一些额外的数据,它给了我一个 404 错误。我尝试添加如下所示的标题,但仍然没有运气。我附上了一张快照,以显示正在加载的不同请求标头。
此外,我无法关联 cflags、umps 会话 ID,因为我不确定它们来自哪里。我没有在服务器响应中看到。只是标题。有人可以在这里给我一些信息吗?
如果我遗漏了什么,请告诉我。
[//Key Value Accept text/javascript, text/html, application/xml, application/json, text/xml, */*
web_add_header("Accept", "text/javascript, text/html, application/xml, application/json, text/xml, */*");
//Key Value X-Requested-With XMLHttpRequest
web_add_header("X-Requested-With", "XMLHttpRequest");
//Key Value Content-Type application/x-www-form-urlencoded
web_add_header("Content-Type", "application/x-www-form-urlencoded");
//Key Value Host 0.umps40-c2-was.salesforce.com
web_add_header("Host", "0.umps40-c2-was.salesforce.com");
web_add_header("umpsSessionId", "dummy");
web_add_header("chanelId", "dummy");
web_add_header("objectId", "dummy");
web_add_header("orgID", "dummy");
web_add_header("sessionId", "dummy");
web_add_header("Cookie", "BrowserId={BrowserId_1}");
//Key Value umpsSessionId f4ba5dacfe5785ca04b3372b50d8ea179d4d1e72
//Key Value User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
web_add_header("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko");
//Key Value connectUrl https://na30.salesforce.com
web_add_header("connectUrl", "https://na30.salesforce.com");
//Key Value Request PUT /api/channel/v28.0/common/sessions/this?cflag=1454473295572 HTTP/1.1
web_add_header("Request", "PUT /api/channel/v28.0/common/sessions/this?cflag=1454473295572 HTTP/1.1");
web_submit_data("sessions",
"Action=https://1.umps40-c2-was.salesforce.com/api/presence/v28.0/common/sessions?cflag=1454434577950",
"Method=POST",
"TargetFrame=",
"RecContentType=application/json",
"Referer=https://1.umps40-c2-was.salesforce.com/umps/UMPSWidget_184/_js.html?cflag=184.36&order=2&parentUrl=https://na30.salesforce.com&connectUrl=https://na30.salesforce.com",
"Snapshot=t14.inf",
"Mode=HTML",
ITEMDATA,
"Name=data", "Value={}", ENDITEM,
LAST);][1]