File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -922,7 +922,7 @@ curl -H "X-API-Key: 1234567890" -H "X-Request-ID: 1234567890" http://localhost:3
922922
923923The server validates these headers against the declared schema before handling the request.
924924
925- ### Status Codes (TODO: does this work?)
925+ ### Status Codes
926926
927927By default, the success status code is ` 200 OK ` . You can change it by annotating the schema with a custom status.
928928
@@ -945,7 +945,8 @@ const Api = HttpApi.make("MyApi")
945945 HttpApiGroup .make (" Users" )
946946 .add (
947947 HttpApiEndpoint .get (" getUsers" , " /users" , {
948- success: Schema .Array (User ) // how to set the status code?
948+ success: Schema .Array (User )
949+ .annotate ({ httpApiStatus: 206 })
949950 })
950951 )
951952 )
You can’t perform that action at this time.
0 commit comments