Page 37 of 42
Re: PureBasic 6.00 Beta 9 released !
Posted: Sun Jun 05, 2022 7:29 pm
by Fred
OK for the HttpTimeout() function, will reduce the number of optional param for HttpRequest() which is already big.
Re: PureBasic 6.00 Beta 9 released !
Posted: Sun Jun 05, 2022 8:33 pm
by RichAlgeni
Maybe the command could be named differently? Such as HTTPRequestE. Adding 'E' to the end, to show it is the Enhanced command, for instance?
Re: PureBasic 6.00 Beta 9 released !
Posted: Sun Jun 05, 2022 8:50 pm
by Marc56us
RichAlgeni wrote: Sun Jun 05, 2022 8:33 pm
Maybe the command could be named differently? Such as HTTPRequestE. Adding 'E' to the end, to show it is the Enhanced command, for instance?
Timeout in B9 is not only used in HTTPRequest() but also in ReceiveHTTPFile(), ReceiveHTTPMemory(), HTTPRequestMemory()
(see statusbar when click on one of them)
So HttpTimeout(<value>) will work for all and need only one command.

Re: PureBasic 6.00 Beta 9 released !
Posted: Sun Jun 05, 2022 10:35 pm
by infratec
In my version I simply added the Timeout parameter as last optional parameter.
So no change to available code is needed. Only if you need the parameter.
You can use #Null for Header() map if not used.
Re: PureBasic 6.00 Beta 9 released !
Posted: Sun Jun 05, 2022 11:13 pm
by DeanH
My original idea was to use HttpTimeout to set and change as needed.
What about having both a HttpTimeout function and an optional parameter at the end of the HttpRequests? That provides maximum flexibility without breaking code.
Re: PureBasic 6.00 Beta 9 released !
Posted: Tue Jun 07, 2022 8:42 am
by griz
DesktopWidth() and DesktopHeight() are returning 1920x1080 even though I am running 4K. Ubuntu 20.04.
Really happy to see all this hard work on Pure Basic. Thank you!
Re: PureBasic 6.00 Beta 10 released !
Posted: Thu Jun 09, 2022 8:37 pm
by Fred
Beta 10 is available, with some more some improvements:
Code: Select all
- Added: HTTPTimeout() for HttpRequest commands (reverted the changes from beta 9)
Re: PureBasic 6.00 Beta 10 released !
Posted: Fri Jun 10, 2022 12:11 am
by DeanH
Thank you very much, Fred! I appreciate the promptness.
Re: PureBasic 6.00 Beta 10 released !
Posted: Fri Jun 10, 2022 3:32 pm
by ChrisR
Thank you Fred and the team for all the hard work.
I hope we are approaching the final version with the changelog shrinking.
Is it possible to automatically add the C compiler in the settings, instead of adding it manually at each beta ?
Re: PureBasic 6.00 Beta 10 released !
Posted: Fri Jun 10, 2022 7:51 pm
by jacdelad
Just out of curiosity: How does HTTPTimeout work with threads? Separate values or one value? Also, does it return the previous timeout?
Re: PureBasic 6.00 Beta 10 released !
Posted: Mon Jun 13, 2022 9:50 am
by Fred
It's one value for the whole app, not per thread. It doesn't return the previous timeout.
Re: PureBasic 6.00 Beta 10 released !
Posted: Mon Jun 13, 2022 10:26 am
by User_Russian
Fred wrote: Mon Jun 13, 2022 9:50 amIt's one value for the whole app, not per thread.
It is necessary to write about in help.
And for other functions that do not support multithreading, you also need to write in help. To let people know what can't be used in multiple threads.
Re: PureBasic 6.00 Beta 10 released !
Posted: Mon Jun 13, 2022 11:00 pm
by jacdelad
@Fred: Maybe it's a good idea to get the previous timeout as return value, or by passing special value (like 0 for default and -1 for getting the now set value).
Re: PureBasic 6.00 Beta 10 released !
Posted: Wed Jun 15, 2022 3:45 am
by DeanH
Good idea to get the current timeout. Maybe the same function but with a constant that tells the function to return a timeout value rather than set one. CurrentTimeOut = HTTPTimeout(#Pb_Any) or another constant? Or another function? HTTPGetTimeout() ?
Re: PureBasic 6.00 Beta 10 released !
Posted: Wed Jun 15, 2022 4:31 am
by plouf
isnt that easy to "remember" using a global variable ?
i.e
global httptimeoutvalue.l
httptimeoutvalue =100
HttpTimeout(httptimeoutvalue)
httptimeoutvalue =500
HttpTimeout(httptimeoutvalue)
...