How to make an HTTP get request with parameters

后端 未结 5 2241
故里飘歌
故里飘歌 2020-12-02 12:59

Is it possible to pass parameters with an HTTP get request? If so, how should I then do it? I have found an HTTP post requst (link). In that exampl

5条回答
  •  悲&欢浪女
    2020-12-02 13:26

    You can also pass value directly via URL.

    If you want to call method public static void calling(string name){....}

    then you should call usingHttpWebRequest webrequest = (HttpWebRequest)WebRequest.Create("http://localhost:****/Report/calling?name=Priya); webrequest.Method = "GET"; webrequest.ContentType = "application/text";

    Just make sure you are using ?Object = value in URL

提交回复
热议问题