Thanks for the article. I am yet to understand most of the things you talked about. This particular one in the introduction left me a little confused.
Given a URL looking like so /products?page=1&pagesize=20, the query parameters are everything that happens after ?.
What about query string? I have always thought page=1 is a paramter-value pair. When you combine parameter-value pairs after the ?, you make up query string. Can i use the terms query string and query parameters interchangeably to mean the same thing?
query string is the full string ?page=1&pagesize=20. A query parameter is just one of the values like page. Query parameters are just a term to say all the parameters, in that I guess it's synonymous to query string. I'm using this terminology parameters as we also have other types of parameters, like route parameters.. If it helps, if someone says query string they mean this ?page=1&pagesize=20. If someone says query parameters they most likely want to parse the query string to something like this { page: '1', pageSize: '10' } so it can be used to filter a response. I think of a URL like this http://localhost:3000/products/<route parameter>?queryParameter=value&anotherQueryParameter=value.
Thanks for the article. I am yet to understand most of the things you talked about. This particular one in the introduction left me a little confused.
What about query string? I have always thought
page=1
is a paramter-value pair. When you combine parameter-value pairs after the?
, you make upquery string
. Can i use the termsquery string
andquery parameters
interchangeably to mean the same thing?EDIT:
I am still a newbie.
query string is the full string
?page=1&pagesize=20
. A query parameter is just one of the values likepage
. Query parameters are just a term to say all the parameters, in that I guess it's synonymous to query string. I'm using this terminology parameters as we also have other types of parameters, like route parameters.. If it helps, if someone says query string they mean this?page=1&pagesize=20
. If someone says query parameters they most likely want to parse the query string to something like this{ page: '1', pageSize: '10' }
so it can be used to filter a response. I think of a URL like thishttp://localhost:3000/products/<route parameter>?queryParameter=value&anotherQueryParameter=value
.Thanks for the quick response. I guess i am just overthinking things.