I have a web site I need to use frequently but for some reason keeps lagging and am forced to interact with it on a daily basis
so I was looking around in the js code of the website and found that the website use an api on another server so for some while I was using CURL to send my requests directly to the api
but every time I need to send my request I have to reboot to my linux becaus I didn't know how to send requests from windows the command line am using is
curl -i -s -k -X $'POST' \
-H $'Host: WEBSERVER' -H $'Content-Length: 91' -H $'Alias: OPMzqeNCAi' -H $'Sec-Ch-Ua: ' -H $'Source: WEB' -H $'Sec-Ch-Ua-Mobile: ?0' -H $'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.91 Safari/537.36' -H $'Content-Type: application/json' -H $'Accept: application/json, text/plain, */*' -H $'Sec-Ch-Ua-Platform: \"\"' -H $'Origin: WEBSIT' -H $'Sec-Fetch-Site: cross-site' -H $'Sec-Fetch-Mode: cors' -H $'Sec-Fetch-Dest: empty' -H $'Referer: MAINWEBSITE' -H $'Accept-Encoding: gzip, deflate' -H $'Accept-Language: en-US,en;q=0.9' -H $'Connection: close' \
-b $'SESSION=COOKI' \
--data-binary $'{\"ALIAS\":\"EXTRA\",\"P_USERNAME\":\"WebSite\",\"P_ID\":\"INFO\",\"P_VERIFICATION_CODE\":null}' \
$'PATH TO EXECUTE REQUEST'
I need to make this work in c# but I have no Idea where to start the request is to complicate for me to know how I should but all this parameters in c# http request and read server response if my request was processed
curl -i -s -k -X $'POST' \
-H $'Host: WEBSERVER' -H $'Content-Length: 91' -H $'Alias: OPMzqeNCAi' -H $'Sec-Ch-Ua: ' -H $'Source: WEB' -H $'Sec-Ch-Ua-Mobile: ?0' -H $'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.91 Safari/537.36' -H $'Content-Type: application/json' -H $'Accept: application/json, text/plain, */*' -H $'Sec-Ch-Ua-Platform: \"\"' -H $'Origin: WEBSIT' -H $'Sec-Fetch-Site: cross-site' -H $'Sec-Fetch-Mode: cors' -H $'Sec-Fetch-Dest: empty' -H $'Referer: MAINWEBSITE' -H $'Accept-Encoding: gzip, deflate' -H $'Accept-Language: en-US,en;q=0.9' -H $'Connection: close' \
-b $'SESSION=COOKI' \
--data-binary $'{\"ALIAS\":\"EXTRA\",\"P_USERNAME\":\"WebSite\",\"P_ID\":\"INFO\",\"P_VERIFICATION_CODE\":null}' \
$'PATH TO EXECUTE REQUEST'
this comand line works fine on linux on windows curl couldn't make it work so I want to do so with simple c# winform app