Reputation: 331
I have captured an HTTP packet I wish to send to a website trough Firefox's Network Tab and I wish to send it to the website trough C#.
Its content is a multi-part form data, and I know how to properly edit the content from within the raw packet to send what I wish, but I do not know how to send it.
Is there some way to do it straight trough HttpClient or do I need to p/invoke and use Winsock?
Note: I know I can send it more easily but I wish to know how to send it this way.
Upvotes: 0
Views: 142
Reputation: 24403
The HTTP client is designed to automate and abstract away the vast majority of the details of the HTTP protocol implementation. If what you're saying is that you have an actually binary structure that corresponds to an HTTP protocol transmission, the HttpClient is too high-level a tool and you need to use a different class/framework that operates on a socket level.
Upvotes: 2