Created
April 17, 2020 21:04
-
-
Save NyaGarcia/1a3d806aea24f78b52a12708f611ecc8 to your computer and use it in GitHub Desktop.
Observable created with ajax()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ajax } from "rxjs/ajax"; | |
// Observable will emit the entire AjaxResponse object | |
const ghibliFilmsResponse$ = ajax("https://ghibliapi.herokuapp.com/films"); | |
ghibliFilmsResponse$.subscribe(console.log); | |
// Output: AjaxResponse {xhr: {}, request: {}...} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment