Hey guys, I'm working with an old HTTP framework and I'm trying to convert the requests into observables.
The framework works like this:
// Define callback object
class MyCallback : CkCallback
{
void OnUpdate(HttpUpdate update)
{
// handle progress, or success, or failure, or canceled
}
}
// Set callback
CkHttp http;
auto callback = new MyCallbackObject;
http.set_callback_object(callback);
// Start asynchronous GET
CkTask task = http.GetAsync("http://www.google.ca/");
// (Optional) Cancel asynchronous GET
task.Cancel();
I want to turn this into an observable, but I'm not really sure how to do it. Any tips on it? I've looked it up online but haven't found anything similar in RxCpp or RxJS.
Hey guys, I'm working with an old HTTP framework and I'm trying to convert the requests into observables.
The framework works like this:
I want to turn this into an observable, but I'm not really sure how to do it. Any tips on it? I've looked it up online but haven't found anything similar in RxCpp or RxJS.