Code: Select all
InitNetwork()
NewMap Header$()
Header$("Content-Type") = "plaintext"
Header$("UserAgent") = "Firefox 54.0"
httpheader$=GetHTTPHeader("https://www.google.com",#PB_HTTP_NoRedirect,Header$("UserAgent"))
HttpRequest = HTTPRequest(#PB_HTTP_Get, "https://www.google.com", "", 0, Header$())
If HttpRequest
Debug "StatusCode: " + HTTPInfo(HTTPRequest, #PB_HTTP_StatusCode)
Debug "Response: " + HTTPInfo(HTTPRequest, #PB_HTTP_Response)
FinishHTTP(HTTPRequest)
Else
Debug "Request creation failed"
EndIf
but how can I get the real ResponseHeader of the HTTPRequest ,like the libCurl setting below?
Code: Select all
curl_setopt($ch, CURLOPT_HEADER, 1);