Sivakumar

Sivakumar

  • NA
  • 551
  • 218.4k

Error Code 400 bad request

Sep 23 2015 6:41 AM
Hi,
 
This is my code :
 
[Route("{teamId}/metrics/{memberId}={memberrole}")]
public int UpdateMemberRole(int teamId,int memberId, Enum memberrole)
{
return _team.UpdateMemberRole(teamId, memberId,memberrole);
} 
 
This is my MemberRole Model Class :
 
public enum MemberRole : short
{
Default = 1,
Observer = 2,
Moderator = 3
} 
 
When I call Web api like this :
 
http://localhost:54075/api/teams/1/metrics/3=2
 
then show a Bad request error
 
Please give me suggestions

Answers (1)