It seems to me that something strange happens trying to consume a WebApi POST method with RestSharp Client. The code below are for both the Server(WebApi) and the Client respectively .

**Server WebApi**

```
[Route("UserRoles")]
[AllowAnonymous]
public IHttpActionResult Post(
    [FromBody] UserroleDto userroleDto,
    [FromUri] string appCode)
{
  return OK();
}

```

And **Test Client**:

```
[TestInitialize()]
public void Initialize()
{
    _restClient = new RestClient("http://localhost:8089");
}

[TestMethod]
public void Can_Store_A_Userrole_Via_REST_WebAPI()
{
    var request = new RestRequest(ApiBasePath, Method.POST);

    request.AddUrlSegment("segment", "UserRoles");
    request.RequestFormat = DataFormat.Json;
    request.AddBody(
        new UserroleDto()
        {
            UserRoleId = -1,
            Role = "Developer"
        });

    request.AddHeader("appCode", AppCode);
    //request.AddParameter("appCode", AppCode);

    _restClient.Execute(request);
}

```

The scenarios are:

1. If I comment out the `[FromUri] string appCode` from the POST method and the `request.AddParameter("appCode", AppCode);` from the Test, the test Pass.
2. If I include the `[FromUri] string appCode` on the POST method and I run the method from POSTMAN, the test Pass.
3. If I include the `[FromUri] string appCode` on the POST method and the `request.AddParameter("appCode", AppCode);` on the Test respectively, the test fail. Error message:
**Method Not Found on the Controller**

Any advice would be most welcome!