Demo:  ajax

The ajax creates an observable for an ajax request using either an url or a request object with url, headers, etc

//returs {"message":"hi"}
//check tooltips on the dot for complete message
let ajaxResult = ajax("/api/echo?message=hi");

//get the message key
let process = map((res:any) => res?.message);
let handleError = catchError(err => of("Err"));

let output = ajaxResult.pipe( process, handleError)
             .subscribe(v=>console.log(v))