I want to send data to a url via HttpWebRequest in ASP.net but I need to send some data via GET method and another data via POST method, is it possible? How do I send it?
ASP.NET.NET Programming
Last Comment
philipjonathan
8/22/2022 - Mon
philipjonathan
Are you saying that you want to send both GET and POST data in the same request. I think that's possible. You can encode the GET data as Query String, but still set the request method as POST and write the POST data into the request stream.
Well, to be correct, actually you are sending those through query string. However, if you are making GET request, the only way you can pass parameters is also through query string.
Btw, what do you want to achieve actually? Maybe if you can tell use more, we can provide better suggestion ...
I want to suscribe e-mail addresses to a mailing list via code, the form to suscribe to this list send query string parameters and the name and e-mail address with a POST like this.