Page 1 of 1

pb-httprequest-manager

Posted: Fri Jun 04, 2021 8:38 pm
by deseven
A queue manager for HTTPRequest(), supports timeouts, parallel requests and completion events. Originally created to mitigate a couple of bugs, but can also be used if you need to make a ton of requests with little effort.

Basic usage example:

Code: Select all

IncludeFile "httprequest-manager.pbi"

InitNetwork()
HTTPRequestManager::init()

For i = 1 To 10
  HTTPRequestManager::easyRequest(#PB_HTTP_Get,"https://google.com/")
Next

While HTTPRequestManager::getNumActive()
  HTTPRequestManager::process()
  Delay(50)
Wend

HTTPRequestManager::free(#PB_All)
The most recent version and more complex example can be found on github: https://github.com/deseven/pb-httprequest-manager

Re: pb-httprequest-manager

Posted: Sun Jun 06, 2021 8:14 pm
by Kwai chang caine
Works here, thanks for sharing 8)

Re: pb-httprequest-manager

Posted: Fri Jan 24, 2025 4:19 am
by deseven
Updated with the ability to handle binary data (for downloading files) and a couple of other small improvements.
There is no proper changelog, but you can check out the changes in the commit.

One important thing I should definitely mention:
- response\response is now split into two separate fields - text and binary. As a direct replacement you should use text.

Re: pb-httprequest-manager

Posted: Fri Jan 24, 2025 8:32 am
by Caronte3D
Nice!
Thanks for sharing it :wink: