I have been struggling with an error in my code for the past two days and I can't seem to find a solution. Can someone please help me with this?
The error message is as follows:
[Error] WebSocket network error: The operation couldn’t be completed. Connection refused (x192) [Error] ERROR – Response {_body: XMLHttpRequestProgressEvent, status: 0, ok: false, …} Response {_body: XMLHttpRequestProgressEvent, status: 0, ok: false, statusText: “”, headers: Headers, …}Response
Here is a snippet of the code that is causing the issue:
import { Http, Headers, RequestOptions } from ‘@angular/http’; import { Injectable } from ‘@angular/core’; import ‘rxjs/add/operator/map’; /* Generated class for the RestapiServiceProvider provider. See https://angular.io/guide/dependency-injection for more info on providers and Angular DI. */ @Injectable() export class RestapiServiceProvider { apiUrl = ‘http://localhost:8100/development/abc/public/api/v1/apiName’; constructor(public http: Http) { console.log(‘Hello RestapiServiceProvider Provider’); } getUsers() { // Code block goes here } }