Page 1 of 1

Additional type for HTTPInfo(): #PB_Http_Header

Posted: Mon Apr 15, 2019 8:46 pm
by infratec

Code: Select all

#PB_Http_Header
should return the complete http header.

Than we can extract what's needed to know.
Like Cookies.

Re: Additional type for HTTPInfo(): #PB_Http_Header

Posted: Tue Apr 16, 2019 10:04 am
by Lord
infratec wrote:

Code: Select all

#PB_Http_Header
should return the complete http header.
...
This would be very helpfull.

Re: Additional type for HTTPInfo(): #PB_Http_Header

Posted: Tue Apr 16, 2019 10:16 am
by Fred
Nice idea. I guess GetHTTPHeader() could be deprecated then if a new #PB_Http_HeaderOnly flag is added.

Re: Additional type for HTTPInfo(): #PB_Http_Header

Posted: Tue Apr 16, 2019 11:13 am
by infratec
No,

Code: Select all

GetHTTPHeader()
is still needed.

Else you can not check how large a file is what you need to download before you download it.
Maybe you need to check if the file fits in your free memory before you download it.
That's only possible with GetHTTPHeader(), because it makes no real download.

Bernd

Re: Additional type for HTTPInfo(): #PB_Http_Header

Posted: Tue Apr 16, 2019 2:03 pm
by Fred
That's why I added: "if a new #PB_Http_HeaderOnly flag is added." :)

Re: Additional type for HTTPInfo(): #PB_Http_Header

Posted: Fri May 31, 2019 6:03 pm
by kenmo
+1000

Great request, I really hope this can be added for 5.71!

Right now I am resorting to curl.exe because I need access to Cookies / other headers returned from a server.

Re: Additional type for HTTPInfo(): #PB_Http_Header

Posted: Fri May 31, 2019 6:28 pm
by infratec
You don't need curl.exe :mrgreen:

libcurl is included in PB. You can use libcurl.pbi (search) to implement what's needed.

Re: Additional type for HTTPInfo(): #PB_Http_Header

Posted: Fri Oct 18, 2019 9:08 pm
by DoubleDutch
+1 for this, I need it to use tinypng properly:

https://tinypng.com/developers/reference