M
M
martensit2018-04-21 16:12:20
C++ / C#
martensit, 2018-04-21 16:12:20

How to send an https GET or POST request in c# using only url and raw (request body) from the parameters?

If you send requests via HttpWebRequest, you need to separately enter the necessary parameters "Host", "KeepAlive", "UserAgent" ..... there can be more than 15 such headers.
And when HttpWebRequest is executed, all these headers (parameters) do not always go in the right sequence, and a part may be skipped altogether.
Is it possible to send an https GET or POST request by specifying the RAW request itself instead of all these parameters (headers)? With the order of titles I need. And exactly the way I want to see it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VoidVolker, 2018-04-21
@martensit

Of course you can:

  1. We take the host from the link
  2. Getting an IP address
  3. At this address, we usually open a connection through a regular socket
  4. We send the necessary data through the socket
  5. Closing the connection

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question