Hi,

While developing an Angular 7 web app, I am using the proxy.conf.json file 
and --proxy-config option on the ng serve command to proxy 
my requests from https://localhost:4200/api to a remote url which hosts the 
actual REST API.

When doing an HTTP GET request directly to the remote url through my 
browser (Chrome) or Postman, I always get the full (valid) JSON response 
like I expect it to be. 

In order to simulate the problem, I created a (local) endpoint 
(localhost:8080/sample) which returns a huge json:

[
   "This is line 0",
   "This is line 1",
   "This is line 2",
...
    "This is line 199997",
   "This is line 199998",
   "This is line 199999"
]

When requesting this on the angular proxy url, I get only a part of the 
JSON response or an invalid JSON, with values 
I did not expected:

 ...
 "This is line 126439",
 "This is line 126440"s line 126813","This is line 126814",


I am aware that the API returns response header Transfer-encoding 'chunked' 
and from what I understand, 
this means having to process the response as a stream.

Anyone seen this strange issue before?

I would like to retrieve a valid, correct JSON over the angular proxy 
without changing the API.

Kind regards,

Koen

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/c0832979-a069-4553-948c-b50e382b4790%40googlegroups.com.

Reply via email to