according to this answer How to return an empty observable in rxjs i have tried all of it but it did not work for me
here is my code
post(url):Observalbe<any>{
   if(this.holder.nullConnection()){ //checking internet connection
      //return empty observalbe
      return Observable.empty() ;
    }else{
      return this.http.post(this.configurator.restServerBaseUrl+url,data)
      .map((result:Response)=> {
        return result.json()
      })
    }
}
i have tried almost all the answers as per the stack question you can see above any help to return an empty obserable.
 
     
     
    