asp.net web api - Send parameter to WebApi Action with Postman? -


i have following action:

[httppost] public ihttpactionresult getbyusername(string username) {     return ok(_userbusinesscomponent.getuserbyusername(username)); } 

how can send username action via postman tried followings, nothing response:

postman screenshot

postman screenshot

i change signature of action following:

public ihttpactionresult getbyusername([frombody]string username) 

this time username null !!!

as ibubi said, following web api action

[httppost] public ihttpactionresult getbyusername(string username) {     return ok(_userbusinesscomponent.getuserbyusername(username)); } 

i have use following code:

http://localhost:51671/api/user/getbyusername?username=moha‌​mmad 

Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -