last day (14 days later) » 

12:14 PM
0
A: Angular 2 + NativeScript Response with status: 200 for URL: null

mast3rd3monTry changing your map to this: .map(result => result.json()) You may need to map the data a level down depending how it's returned: .map(result => result.json().data)

 
i've already tried without the map and do functions, and i get error in subscribe catch.
the request don't pass into map function, it goes directly to catch.
 
I've done this for several calls now. Writing either .map(result => result.json()) or .map(result => result.json().data) will work depending on what the return data looks like
 
I understand, the problem is before map function been called. The errors occurs even when i remove it.
 
Try getting rid of the .do and .subscribe for now and log out what result.json() is
 
{"_body":{},"status":200,"ok":true,"statusText":"","headers"‌​:{},"type":3,"url"‌​:n‌​ull}
 
12:14 PM
I'm not sure then as I don't recall ever getting that from a server call
Are you expecting a json array/object as your return data?
 
The response is a json. In postman i can request successfuly. :/
 
In your code, add headers.append("Accept", "application/json");
 
(observation: i change my url code to a test url from "requestb.in/1lgyupo1" and the response was OK, the error occurs only on my API endpoint)
i addedd "Accept" header, and the error still occuring
 
Sounds like a server error then, not entirely sure
 
i think so
i'll look on api implementation
 
12:30 PM
ok, im sorry i cant help further
If you like, i could try to get it working? i dont mind taking a look
 
 
1 hour later…
1:48 PM
@mast3rd3mon i've updated my question with more details. Could you help me again please?
 
2:28 PM
I'm not sure if i can, ive never used the xml http stuff
 

last day (14 days later) »