File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -125,10 +125,14 @@ And shut it down with: -
125125
126126 docker compose down
127127
128- You can interact with it using ` http ` , where you should be able to create
129- and delete event streams using the internal API. Here we're using
130- ` jq ` and ` cut ` to process the response body to simplify the subsequent ** DELETE**
131- request: -
128+ You can interact with it using ` http ` , where you should be able to
129+ get the version of the service, create, and delete event streams
130+ using the internal API: -
131+
132+ http localhost:8081/event-stream/version/ -b
133+
134+ Here we're using ` jq ` and ` cut ` to process the response body to simplify the
135+ subsequent ** DELETE** request: -
132136
133137To create (** POST** ) an event stream, run the following:
134138
Original file line number Diff line number Diff line change @@ -229,18 +229,18 @@ async def _get_from_queue(routing_key: str):
229229# Endpoints for the 'internal' event-stream management API -----------------------------
230230
231231
232- @app_internal .post ("/event-stream/version/" , status_code = status .HTTP_200_CREATED )
232+ @app_internal .get ("/event-stream/version/" , status_code = status .HTTP_200_OK )
233233def get_es_version () -> EventStreamGetVersionResponse :
234234 """Returns our version information."""
235235 # And construct the location we'll be listening on...
236- return EventStreamPostResponse (
236+ return EventStreamGetVersionResponse (
237237 category = "WEBSOCKET" ,
238238 name = "Python FastAPI" ,
239239 version = _VERSION ,
240240 )
241241
242242
243- @app_internal .post ("/event-stream/" , status_code = status .HTTP_201_OK )
243+ @app_internal .post ("/event-stream/" , status_code = status .HTTP_201_CREATED )
244244def post_es (request_body : EventStreamPostRequestBody ) -> EventStreamPostResponse :
245245 """Create a new event-stream returning the endpoint location.
246246
You can’t perform that action at this time.
0 commit comments