You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to execute veracode api using curlSharp library. Manually I can execute the command as below.
curl --compressed -u [veracodeuser]:[mypassword] https://analysiscenter.veracode.com/api/4.0/getapplist.do -F 'include_user_info=true'
@devendert First of all my apologies for late reply.
To enable compressed transfer, use the following code to set the Accept-Encoding: header:
easy.SetOpt(CurlOption.Encoding,"gzip");
Make sure to use a libcurl DLL which was built with ZLIB support. (The DLLs provided with curlsharp should be fine.)
As for authentication, the UserPwd property should be populated with username and password separated by colon:
easy.UserPwd ="username:password";
As for providing HTTP form data, please see the EasyPost sample project. More specifically, refer to the TEST 3 CurlEasy HttpPost section to see how to construct and use HTTP multi-part form data. If you simply need to transmit some raw POST data, you may use the PostFields property (see the TEST 2 CurlEasy PostFields section of the same project) It seems you may not need to the complicated CurlHttpMultiPartForm object for veracode.com...
First of all my apologies; This is not an issue.
I am trying to execute veracode api using curlSharp library. Manually I can execute the command as below.
curl --compressed -u [veracodeuser]:[mypassword] https://analysiscenter.veracode.com/api/4.0/getapplist.do -F 'include_user_info=true'
using (var easy = new CurlEasy())
{
easy.UserPwd = "Password"
easy.AutoReferer = true;
easy.FollowLocation = true;
easy.Url = textBoxUrl.Text.Trim();
easy.WriteFunction = OnWriteData;
easy.Perform();
}
I couldn't figure out how to pass username and --compressed -F options. Could you please let me know if I can accomplish this with CurlSharp.
I appreciate your response.
The text was updated successfully, but these errors were encountered: