%Stream.GlobalBinary has a warning:

Note that on a unicode Cache although you can write unicode data into this class and read it back out this is not a supported use of this class and the Size property would be incorrect in this case as it would be the size in characters rather than the size in bytes

   do content.OutputToDevice()
now your content is out and you are positioned at end

    do content.MoveTo(content.Size)
now you re-read content until LastCharacter-1, whatever total size might be
    set isNewLineTerminator = (content.Read(1) = $char(10)) 
reading the assumed last character

you might be better off to use  
content.ReadLine(,.sc,.eol) and check eol for the termination status

 (in my case, whereas one would need

This means you try to get information that is stored in your router's and/or firewall's  (NAT, DHCP,... ) routing/mapping table.
I'd assume you need to use some utility of your OS using $ZF(-1,...) $ZF(-2,...) to get the outside view of the inside server

This might work inquiring nslookup on a DNS server outside your NAT, ...  Though I never tried it

without any  REST (at that point)  as you expect to hand action from front-end to back-end:

If your front-end is able to listen on a dedicated IP port  then all you need is to send your data to the (negotiated?) IP:port.
Take a look to %Net.HttpRequest 

From point of view of Caché your front-end acts then like a web-server receiving data.
Your reply from front-end  signals to Caché that the front-end is ready for the next junk / or terminates the stream

The fact that the table is external  is just a concern of storage strategy in the generated Caché Class
To your COS code  it's just another class projected as table.

Use it by your preferred ResultSet Class
It might be a good idea to check access first from Mgmt Portal to verify access rights.

for the example: