1

How do I make an http request to a webservice on document load using cyclejs? The examples cover reacting to user input and don't meet my needs.

jdoig
  • 1,472
  • 13
  • 27

1 Answers1

5

You may try to create a request stream and pass it to the HTTPDriver. For example:

const request$ = Rx.Observable.just({
    url: 'http://www.google.com',
    method: 'GET'
});

Then:

return {
  HTTP: request$
};
erdal
  • 421
  • 3
  • 10