I encounter problem with http:send-request
function. I need handle multiple forward requests (3) with
cookies.
First request returns cookies information which are required
with next requests. Output from http:send-request dosen't contains
all fields which are returned by server.
cache-control |
private
|
cf-cache-status |
DYNAMIC
|
cf-ray |
52b3cedc5b9bcc9f-WAW
|
content-type |
text/html; charset=utf-8
|
date |
Fri, 25 Oct 2019 11:21:37 GMT
|
expect-ct |
max-age=604800, report-uri="ht….com/cdn-cgi/beacon/expect-ct"
|
location | |
server |
cloudflare
|
set-cookie |
__cfduid=daf54110b2a87d66c2a53…;
domain=.pracuj.pl; HttpOnly
|
set-cookie |
_yaic=13; expires=Fri, 31-Dec-9999
23:59:59 GMT; path=/
|
set-cookie |
_urnadiam=A;
domain=.pracuj.pl…3:00:00 GMT; path=/; HttpOnly
|
x-aspnet-version |
4.0.30319
|
x-aspnetmvc-version |
5.2
|
X-Firefox-Spdy |
h2
|
x-powered-by |
ASP.NET
|
x-ua-compatible |
IE=edge
|
Request:
http:send-request(
<http:request method='get'
follow-redirect='false'>
<http:header name="User-Agent"
value="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0)
Gecko/20100101 Firefox/69.0"/>
<http:header name="Accept"
value="text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"/>
<http:header name="Accept-Languag"
value="pl,en-US;q=0.7,en;q=0.3"/>
<http:header name="DNT"
value="1"/>
<http:header name="Connection"
value="keep-alive"/>
<http:header
name="Upgrade-Insecure-Requests" value="1"/>
<http:body
media-type='application/x-www-form-urlencoded;
charset=UTF-8'/>
</http:request>, 'https://www.pracuj.pl/praca/java-developer-warszawa,oferta,7171988')
Response form http:send-request is:
<http:response xmlns:http="http://expath.org/ns/http-client"
status="302" message="Found">
<http:header
name="Transfer-Encoding" value="chunked"/>
<http:header name="CF-RAY"
value="52b3d0de097fb839-WAW"/>
<http:header name="Server"
value="cloudflare"/>
<http:header name="Connection"
value="keep-alive"/>
<http:header name="Date" value="Fri,
25 Oct 2019 11:23:00 GMT"/>
<http:header
name="X-AspNetMvc-Version" value="5.2"/>
<http:header name="X-UA-Compatible"
value="IE=edge"/>
<http:header name="CF-Cache-Status"
value="DYNAMIC"/>
<http:header name="Cache-Control"
value="private"/>
<http:header name="X-AspNet-Version"
value="4.0.30319"/>
<http:header name="Set-Cookie"
value="_urnadiam=B; domain=.pracuj.pl; expires=Tue, 31-Dec-2019
23:00:00 GMT; path=/; HttpOnly"/>
<http:header name="Expect-CT"
value="max-age=604800,
report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct""/>
<http:header name="X-Powered-By"
value="ASP.NET"/>
<http:header name="Content-Type"
value="text/html; charset=utf-8"/>
<http:body
media-type="text/html"/>
</http:response>
Two
set-cookie fields is missing.
How should I
invoke http:send-request
to receive proper result ?
Regards
Bogdan