masroore / CurlSharp

CurlSharp - .Net binding and object-oriented wrapper for libcurl.
BSD 3-Clause "New" or "Revised" License
182 stars 71 forks source link

CurlEasy.SetOpt() string parameter bug #2

Closed masroore closed 10 years ago

masroore commented 10 years ago

Even setting the parameters works and does not work. I think it should work interchangeably so and so.

//easy.UserAgent = "Do UserAgent"; // Works easy.SetOpt(CurlOption.UserAgent, "Do UserAgent SetOpt"); // Does not work

//easy.Proxy = "xxx.xxx.xxx.xxx:21320"; // Works easy.SetOpt(CurlOption.Proxy, "xxx.xxx.xxx.xxx:21320"); // Does not work

//easy.PostFields = postData; // Works :) easy.SetOpt(CurlOption.PostFields, postData); // Does not work

//easy.Encoding = "gzip, deflate"; // Works easy.SetOpt(CurlOption.Encoding, "gzip, deflate"); // Does not work

easy.FollowLocation = true; // Works or easy.SetOpt(CurlOption.FollowLocation, true); // Works

At the time, please check yourself

chucklu commented 8 years ago

@masroore clone the source code,and I find the curlEasy.Url ="www.baidu.com" works however,curlEasy.SetOpt does not work