Emulating Curl --user --insecure in c# -


i have following curl call works.

curl --insecure --user user@applicationname:password "https://someurl" 

i cannot life of me httpwebrequest emulate this.

currently trying

 var httpwebrequest = (httpwebrequest)webrequest.create("https://someurl);         httpwebrequest.contenttype = "application/json";         httpwebrequest.accept = "*/*";         httpwebrequest.method = "post";         httpwebrequest.headers["authorization"] = "basic " +    convert.tobase64string(encoding.ascii.getbytes("user@account:password")); 

i getting error authentication failed because remote party has closed transport stream

i guessing has curl command having insecure option cannot life of me see how in request.

do network restrictions/policies cannot download restsharp or other 3rd party libraries...

add line before doing request

system.net.servicepointmanager.servercertificatevalidationcallback = (obj, x509certificate, chain, errors) => true; 

Comments

  1. Emulating Curl --User --Insecure In C - >>>>> Download Now

    >>>>> Download Full

    Emulating Curl --User --Insecure In C - >>>>> Download LINK

    >>>>> Download Now

    Emulating Curl --User --Insecure In C - >>>>> Download Full

    >>>>> Download LINK Dd

    ReplyDelete

Post a Comment

Popular posts from this blog

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -