ofRegisterURLNotification register different callbacks for different URL's

I am using ofLoadURLAsync() and ofRegisterURLNotification() successfully in a class - the URL request is slow and clunky due to the API but it works perfectly. I would like to run another ofLoadURLAsync() from a different class, but have the callback for each ofLoadURLAsync() be returned to their own respective classes. At the moment the class I call ofRegisterURLNotification() on first gets all the callbacks from all ofLoadURLAsync() calls in any class.

Is there a way to register specific ofLoadURLAsync() calls to specific classes?


yes. ofLoadURLAsync() returns an int, which is the id of the request. The callback function you register with ofRegisterURLNotification()
should be something as:

void callback (ofHttpResponse& response){
response.request.getId() // this should be the same as the id you get from ofLoadURLAsync()