First I use
ClearCookies[All];
ck = URLRead @ httpsHTTPRequest["https://wolfram.com",CookieFunction->Print]
to get an example of cookies. Then I save the cookie example to a variable and use
req = HTTPRequest["www.example.com",<|"Cookies"->{cookies}|>];
URLRead@req;
I both tried adding and not adding a {}
to the cookies
but they all have the same results. Website shows me "permission-denied" and acquire login. I'm trying to capture my browser identity cookies and use them in mathematica HTTPRequest
function.
I use Fiddler to find out what request is sent by MMA kernel.
Here is the record of Fiddler:
As you can see, there is no cookies data sent in this request. I searched reference but not found examples for how to send requests with cookies data. Here is a request with normal cookies data from Edge.
I'm quite confused about the cookies usages in mathematica, reference shows only cookies management but not telling how to sending them. Can someone tells me how to send requests with correct cookies data? I'm using these requests to access and dig some websites which need certification.