Get/post data from a stream