1
Answer

Error Code 400 bad request

Sivakumar

Sivakumar

9y
403
1
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)