Reputation: 7237
What's the difference between BindingSource.Path
and BindingSource.Query
?
From what it seems non-complex values default to BindingSource.Path
but I can't really understand the difference between these two.
[HttpGet("{id}")]
public ActionResult<string> Get(int id) // id = BindingSource.Path
{
return "value";
}
Upvotes: 0
Views: 93
Reputation: 32072
From the documentation:
BindingSource.Path
: ABindingSource
for the request url path.
An URL path is normally in the format of [controller]/[action]/{id?}
BindingSource.Query
: ABindingSource
for the request query-string.
An URL with a query-string is normally in the format of [controller]/[action]?parameterName=parameterValue
.
As examples:
BindingSource.Path
: http://localhost:1234/api/test/1
BindingSource.Query
:http://localhost:1234/api/test?id=1
Upvotes: 1