I am trying to login to an application and it has text/html and some application/json. I am able to login to the application from the previous request but I believe the json is loading some additional data and it is giving me a 404 error. I tried adding the headers as shown below but still no luck. I have attached a snapshot to show the different request headers that are being loaded.
Also, I am not able to correlate cflags, umps session ID as I am not sure where they coming from. I don't see in the server response. Just the headers. Can anyone give me some info here please?
Please let me know if I am missing something.
[//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]