101 · Question #253
In the following request, which portion represents a parameter name?
The correct answer is B. User. In an HTTP request, a parameter name is the key portion of a key-value pair in a query string or form body. Given a request like /Financials?User=Week1, 'User' is the parameter name.
Question
In the following request, which portion represents a parameter name?
Options
- AYes
- BUser
- CWeek1
- DFinancials
How the community answered
(23 responses)- B96% (22)
- C4% (1)
Why each option
In an HTTP request, a parameter name is the key portion of a key-value pair in a query string or form body. Given a request like /Financials?User=Week1, 'User' is the parameter name.
'Yes' would represent a parameter value or a separate value token, not the identifying name of a parameter.
In HTTP query strings and form submissions, parameters follow the name=value format. 'User' is the identifier (key) that names the data being passed, making it the parameter name. 'Week1' would be the corresponding value assigned to that parameter name.
'Week1' is the value assigned to the 'User' parameter, not the parameter name itself.
'Financials' represents the URI path or application resource component, not a parameter name in the query string.
Concept tested: HTTP request parameter name vs value identification
Source: https://learn.microsoft.com/en-us/aspnet/web-api/overview/formats-and-model-binding/parameter-binding-in-aspnet-web-api
Topics
Community Discussion
No community discussion yet for this question.