Angular 6: HttpErrorResponse SyntaxError: Unexpected token s in JSON
问题 I am posting a request and I am suppose to receive a 'success' string back as response. I am getting an HttpResponseError with the following information posted in the image below. PurchaseOrderService postPurchaseOrderCustom(purchaseOrderCustom: PurchaseOrderSaveCustom) { const url = `${this.localUrl}purchaseOrderCustom`; return this.http.post<String>(url, purchaseOrderCustom, {headers: this.header}) .pipe( catchError(this.handleError('postPurchaseOrderCustom', 'I am an error')) ); }