pb-httprequest-manager

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
deseven
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

pb-httprequest-manager

Post 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
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: pb-httprequest-manager

Post by Kwai chang caine »

Works here, thanks for sharing 8)
ImageThe happiness is a road...
Not a destination
Post Reply