- Http is available as an injectable class, with methods to perform http requests.
- Calling request returns an EventEmitter which will emit a single Response when a response is received.
- The method of EventEmitter needs to be called in order to get the RxJS Subject.
- () Call map on the response observable to get the parsed people object .
- ; } }
To use the EventEmitter returned by Http, simply pass a generator (See “interface Generator” in the Async Generator spec: to the observer method of the returned emitter, with optional methods of next, throw, and return.