Skip to content

Commit f283e5a

Browse files
authored
add example request/response examples (#1120)
1 parent 2154aca commit f283e5a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

components/examples.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@ Common use cases:
1515

1616
On mobile devices, `<RequestExample>` and `<ResponseExample>` components display as regular code blocks and can be scrolled past.
1717

18+
<RequestExample>
19+
20+
```bash Request
21+
curl --request POST \
22+
--url https://dog-api.kinduff.com/api/facts
23+
```
24+
25+
</RequestExample>
26+
27+
<ResponseExample>
28+
29+
```json Response
30+
{ "status": "success" }
31+
```
32+
33+
</ResponseExample>
34+
1835
## RequestExample
1936

2037
Use `<RequestExample>` to pins code examples in the right sidebar. This component works similarly to the [CodeGroup](/components/code-groups) component, but displays the code in the sidebar instead of inline.

0 commit comments

Comments
 (0)