You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of WebAPI 2 docs actions can have a HttpRequestMessage parameter, also additional to "normal" parameters and they do not influence the API call URLs. Samples (you can use the project's own demo project to repro):
public IEnumerable<Team> Get(HttpRequestMessage requestMessage)
or public Team GetById(HttpRequestMessage requestMessage, int id)
If I try to cache the output, the default generated cache key contains the whole request data (Headers!!! Incl. user agent, cookies, etc. pp but these headers vary per browser and call! So 99% of the requests will result in a new cache key what makes the server side cache useless.
The WebAPI action resolver ignores such parameter, why does not CacheOutput?
The text was updated successfully, but these errors were encountered:
As of WebAPI 2 docs actions can have a HttpRequestMessage parameter, also additional to "normal" parameters and they do not influence the API call URLs. Samples (you can use the project's own demo project to repro):
public IEnumerable<Team> Get(HttpRequestMessage requestMessage)
or
public Team GetById(HttpRequestMessage requestMessage, int id)
If I try to cache the output, the default generated cache key contains the whole request data (Headers!!! Incl. user agent, cookies, etc. pp but these headers vary per browser and call! So 99% of the requests will result in a new cache key what makes the server side cache useless.
The WebAPI action resolver ignores such parameter, why does not CacheOutput?
The text was updated successfully, but these errors were encountered: