Query Parameters
メニューを表示するにはスワイプしてください
Query parameters are used to send additional data in the URL.
They appear after a ? and are written as key-value pairs.
Example:
'/users?active=true';'/products?category=books'.
In Express, query parameters are accessed using req.query.
app.get('/users', (req, res) => {
const isActive = req.query.active;
res.send(`Active: ${isActive}`);
});
If you open '/users?active=true', the value of isActive will be 'true'.
Query parameters are often used for filtering, searching, or sorting data.
すべて明確でしたか?
フィードバックありがとうございます!
セクション 1. 章 8
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください
セクション 1. 章 8