http Headers without content?
Posted: Mon Oct 21, 2024 1:35 am
How can I get the http headers without downloading the content?
Thanks
Thanks
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
HttpRequest = HTTPRequestMemory(#PB_HTTP_Get, "https://atomicwebserver.com/index.html",0,0,#PB_HTTP_HeadersOnly)
If HttpRequest
Debug "StatusCode: " + HTTPInfo(HTTPRequest, #PB_HTTP_StatusCode)
Debug "headers: " + HTTPInfo(HTTPRequest,#PB_HTTP_Headers)
FinishHTTP(HTTPRequest)
Else
Debug "Request creation failed"
EndIf
You're talking about headers but I liked the signaturevwidmer wrote: Mon Oct 21, 2024 1:35 am I just put stuff here and there and sometimes like magic it works.
Thank you for not noticing as I was able to fix a bug in my code.vwidmer wrote: Tue Oct 22, 2024 12:34 am @idle: Thank you very much!! Not sure how I missed that but it is working as need.