If you do the request with angular http client, the default behaviour is that you get back the response body as a json object... So you could just read it's properties, i.e.:
http.get('test.de').subscribe( (res) => { let test = res.result});
console.log(test);
So what language/framework are you using?
If you get the response object as described in our comment via "res.json()" it would be the same, you could read it's properties... I don't think it is necessary to do a json decode because it already should be a json object.
If you are writing in TypeScript the compiler may not like that he does not know the definition of the object, but you could just cast the response type to be any, object, or json and it should work!
EDIT: Because it is AngularJS and not Angular2+ the response body is in a property called "data" of the angular http response object and types don't matter because it is plain js, so the call should look like this:
http.get('test.de').subscribe( (res) => { let test = res.data.result});
console.log(test); // => Output: 204
EDIT2: If it is the case that I got you wrong and you're writing in typescript and you are using a current angular release and not angularJS you would have to cast to any first! But it would be better to create an interface or class which is describing the response...
Not so pretty way:
http.get<any>('test.de').subscribe( (res) => { let test = res.result});
OR
http.get('test.de').subscribe( (res: any) => { let test = res.result});
Prettier way:
interface BasicApiResponse {
result: JSON | string | number | any; // => here it depends on the specific request...
id: number;
jsonrpc: string;
}
Then you could do s.th. like:
http.get<BasicApiResopnse>('test.de').subscribe( (res: BasicApiResopnse) => { let test = res.result});