c# - Using which method in WebAPI for SignalR in this case -


i understand differences of post(add) , put(update) in web api. however, 1 should use in signalr. when developing chat app

that hub class

 public class chathub : hub  {     ....  } 

that apicontroller class

public class chatclientcontroller : apicontroller {    // [httppost] or [httpput]??     public bool connect(chatconnectionviewmodel model)     {         //connection method     }     //[httppost] or [httpput] ??     public bool sendtextmessage(messageviewmodel model)     {         //send message method     } } 

my question is:
1. when client side send web api request call connect method, request method should use? post or put?

  1. when client side send web api request call sendtextmessagemethod, request method should use? post or put?

in addition

my goal send image file via signalr. got idea this, using signalr via web api. answers?


Comments

Popular posts from this blog

java - AEM: 403 Forbidden occurs when call a Post servlet -

ruby on rails - ActiveRecord order not working -

Google Alert - facebook