-
Notifications
You must be signed in to change notification settings - Fork 8
Add path variables documentation for HTTP client #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,15 +2,15 @@ | |
| title: "Send API Request" | ||
| label: "Send API Request" | ||
| slug: "send-api-request" | ||
| description: "Simplify API testing with Requestly. Send HTTP requests, view responses, and add parameters." | ||
| seoTitle: "Send API Request" | ||
| seoDescription: "Simplify API testing with Requestly. Send HTTP and GraphQL requests, view responses, and add parameters." | ||
| visibility: "PUBLIC" | ||
| --- | ||
|
|
||
| --- | ||
|
|
||
| The API client in Requestly allows you to easily send API requests, without the need for writing code or using a terminal. It lets you test APIs, retrieve data, and explore how they work by simply creating a request, clicking Send, and viewing the response within Requestly. | ||
|
Check warning on line 13 in general/api-client/send-api-request.mdx
|
||
|
|
||
| This feature is perfect for developers testing API endpoints during development, QA engineers validating API responses for edge cases, and support engineers debugging API issues in real-time. | ||
|
|
||
|
|
@@ -92,6 +92,33 @@ | |
|
|
||
| --- | ||
|
|
||
| ## Path Variables | ||
|
|
||
| Path variables allow you to define dynamic segments in your API URL using the `:variableName` syntax. This is useful for RESTful APIs where resource identifiers are part of the URL path. | ||
|
|
||
| For example, if your API endpoint is: | ||
| ``` | ||
| https://api.example.com/users/:userId/posts/:postId | ||
| ``` | ||
|
|
||
| Requestly automatically detects the path variables (`:userId` and `:postId`) from the URL and displays them in the **Params** tab under **Path Variables**. You can then set values for each variable: | ||
|
|
||
| | Key | Value | Description | | ||
| |-----|-------|-------------| | ||
| | userId | 123 | The user's unique identifier | | ||
| | postId | 456 | The post's unique identifier | | ||
|
Comment on lines
+106
to
+109
|
||
|
|
||
| When you send the request, Requestly compiles the URL with your provided values: | ||
| ``` | ||
| https://api.example.com/users/123/posts/456 | ||
| ``` | ||
|
|
||
| <Tip> | ||
| Path variables are automatically extracted from your URL. Simply type a URL with `:variableName` segments, and they'll appear in the Path Variables table for you to fill in. | ||
| </Tip> | ||
|
|
||
| --- | ||
|
|
||
| ## Query Parameters | ||
|
|
||
| In the **Query Params** section, you can add query parameters as **key-value pairs** to send extra information with the URL. To add more parameters, click on the `+ Add More` button. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a language identifier (e.g.,
text) to fenced code blocks to ensure consistent rendering/highlighting in MDX across environments.