Streaming

Streaming #

You can do streaming by adding the keyword stream to your response type.

You need at least furo 1.24.1 to use this feature

Read more about grpc streaming here

Streaming big files to the client #

1
2
3
- md: 'Get: GET /files/{fid} google.protobuf.Empty , stream google.api.HttpBody #Returns the raw file'
    qp:
      fid: 'string #The query param fid stands for the id of a file.'

With google.api.HttpBody you can send any content to the client. Read more about google.api.HttpBody here.

Stream a message type #

1
- md: 'Get: GET /messagestream google.protobuf.Empty, stream message.Message #Returns a stream of messages'

You also can stream a message type to the client.

The response will be packed in a attribute “result”,

Please read the documentation on the grpc-gateway page for configuring your gateway, or have a look on the example subsite