WebApi: mapping parameter to header value

Viewed 16473

I've done a few searches but haven't seem to find anything...

Using WebApi, I would like to map an input parameter to a header value: e.g.

E.g. in controller:

public User GetUser(int id){
   ...
   return user;
}

I want WebApi to map the id parameter to a header value (e.g. X-Auth: 1234)... rather than an URL parameter.

Is this supported?

3 Answers
Related