-
Notifications
You must be signed in to change notification settings - Fork 10k
[Docs Site] Add query prop to APIRequest and CURL #21609
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
Conversation
|
Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment. We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally. PR Change SummaryAdded a query property to the APIRequest and CURL components to allow for URL query parameters.
Modified Files
How can I customize these reviews?Check out the Hyperlint AI Reviewer docs for more information on how to customize the review. If you just want to ignore it on this PR, you can add the Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add |
278cc8f to
dcf63e0
Compare
|
Nit: Example: <CURL
url="https://httpbin.org/anything"
method="POST"
json={{
key: "va'l'ue",
}}
query={{
foo: "bar",
foo: "baz",
bar: "baz",
}}
code={{
mark: "value",
}}
/>Result: Expected result: MDN has a JavaScript example with a repeated key: const url = new URL("https://example.com?foo=1&bar=2");
const params = new URLSearchParams(url.search);
// Add a second foo parameter.
params.append("foo", 4);
console.log(params.toString()); // Prints 'foo=1&bar=2&foo=4' |
Added support for this in 52177d9 - something like |
|
|
||
| ### `query` | ||
|
|
||
| **type:** `Record<string, string>` |
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.
@KianNH We should probably update the type here, since we now support Array values.
Summary
Add query prop to APIRequest and CURL
Screenshots (optional)