docs: fix q parameter in search products section (#5399)
This commit is contained in:
1 parent
c089b0f54b
commit
fc01375a8d
1 file changed
+12
-2
@@ -606,9 +606,15 @@ medusa.products.search({
|
|||||||
<TabItem value="fetch" label="Fetch API">
|
<TabItem value="fetch" label="Fetch API">
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
fetch(`<BACKEND_URL>/store/products/search?q=Shirt`, {
|
fetch(`<BACKEND_URL>/store/products/search`, {
|
||||||
credentials: "include",
|
credentials: "include",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
q: "Shirt"
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
.then(({ hits }) => {
|
.then(({ hits }) => {
|
||||||
@@ -620,7 +626,11 @@ fetch(`<BACKEND_URL>/store/products/search?q=Shirt`, {
|
|||||||
<TabItem value="curl" label="cURL">
|
<TabItem value="curl" label="cURL">
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -L -X POST '<BACKEND_URL>/store/products/search?q=Shirt'
|
curl -L -X POST '<BACKEND_URL>/store/products/search?q=Shirt' \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
--data-raw '{
|
||||||
|
"q": "Shirt"
|
||||||
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|||||||
Reference in new issue
Block a user