Skip to content

Commit 6087c83

Browse files
authored
params and query difference
1 parent 7c54767 commit 6087c83

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2654,7 +2654,12 @@ var server = app.listen(3000, function () {
26542654

26552655
## Q. ***What is the difference between req.params and req.query?***
26562656

2657-
*ToDo*
2657+
params are a part of a path in URL and they're also known as URL variables. for example, if you have the route /books/:id, then the “id” property will be available as req.params.id. req.params default value is an empty object {}.
2658+
2659+
A query string is a part of a URL that assigns values to specified parameters. A query string commonly includes fields added to a base URL by a Web browser or other client application, for example as part of an HTML form. A query is the last part of URL
2660+
2661+
2662+
26582663

26592664
<div align="right">
26602665
<b><a href="#">↥ back to top</a></b>

0 commit comments

Comments
 (0)