HTTP WebService: How to get response headers?

Hello!

I’m currently writing a Snap! library for controlling Gravitrax Power components, with the goal that my son can use Snap! to control it. My goal is to let this run on an Raspi in the local network.

I managed to send a POST to the service to control a stone, now I want to broadcast the notifications. The Service uses ETags and If-Modified-Since to check which notifications have already been passed to the client, and a long-polling-scheme. Which sending the E-Tag is possible using the WebService library, I don’t see how I can access the response header and status codes. Is there some way to do that? Even if I alter the service to send the tag in the content, I am still missing how I can handle HTTP status codes, which would be necessary for proper error handling and (re-)authentication.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.