Skip to content

Commit

Permalink
Replace body attribute for description attribute in Response Object
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosm27 authored and sansyrox committed Aug 26, 2023
1 parent 1128865 commit b928fe8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ from robyn.robyn import Response

@app.get("/response")
async def response(request):
return Response(status_code=200, headers={}, body="OK")
return Response(status_code=200, headers={}, description="OK")
```

#### Status Codes
Expand All @@ -144,7 +144,7 @@ from robyn import status_codes

@app.get("/response")
async def response(request):
return Response(status_code=status_codes.HTTP_200_OK, headers={}, body="OK")
return Response(status_code=status_codes.HTTP_200_OK, headers={}, description="OK")
```

#### Returning a byte response
Expand All @@ -156,7 +156,7 @@ def binary_output_response_sync(request):
return Response(
status_code=200,
headers={"Content-Type": "application/octet-stream"},
body="OK",
description="OK",
)


Expand All @@ -170,7 +170,7 @@ async def binary_output_response_async(request):
return Response(
status_code=200,
headers={"Content-Type": "application/octet-stream"},
body="OK",
description="OK",
)
```

Expand Down

0 comments on commit b928fe8

Please sign in to comment.