GET :http://www.Example.com/Api/1/0/Book/Company/0
[Route(\"{UserId}/{Category}/books/{BookType}/{Page}\")]
[HttpGet]
[RequestAuthorization]
add [FromUri] and try again as below
[Route("{UserId}/{Category}/books/{BookType}/{Page}")]
[HttpGet]
[RequestAuthorization]
public Response Get(([FromUri] BookbRequestModel book )
{
var books= this.contentService.GetUserItems(book.UserId,book.Category,book.BookType,book.Page)
return new Response() { Status = ApiStatusCode.Ok, Books = books};
}
for more information :-
http://www.c-sharpcorner.com/UploadFile/2b481f/parameter-binding-in-Asp-Net-web-api/
It takes the parameters as they are you cannot do this. I would suggest try changing routeConfig.
Add a new route. in WebApiConfig.cs
.
config.Routes.MapHttpRoute(
name: "NewApiRoute",
routeTemplate: "myapi/{Controller}/{id}",
defaults: new { id = new object()//this is to make it generic you can pass object of your class also }
);