There is nothing special about REST responses. They are regular HTTP responses. A REST service could respond with HTML page, XML or JSPN document, or a simple string value. Either way is valid.
In your scenario, service A is a client to service B. A issues REST request (HTTP GET let's say),B accepts it and responds with putting a value in a response body (you choose the format), the A consumes the response body from B and does whatever it needs to do with it.
This is a very rough example:
A:
<?php
$response_from_b = file_get_contents('http://www.b.com/file/some-file-on-b.ext');
// do whatever you need with $response_from_b
?>
B:
<?php
$file_path = parse($_SERVER['REQUEST_URI']); // parse is your own function to get what you want form URI
$native_response = file_exists($file_path); // your own function
$response = decorate($native_response); // your own function
echo $response;
?>