I'm trying to use C# to trigger a remote Jenkins job which has parameters. The job triggers, but I have two problems. First, the parameter is not being received by Jenkins, and two, I'm receiving no response from Jenkins. Here is my code snippet:
`string url = "http://172.30.25.33:8080/job/CloudTeam/job/Tests/job/TestJob/buildWithParameters";
using (var wb = new WebClient())
{
string json = @"{""parameter"": [{""testvar"" : ""user""" + @"""}]`";
//return json;
string password = "mypassword";
string username = "myuser";
string basicAuthToken = Convert.ToBase64String(Encoding.Default.GetBytes(username + ":" + password));
wb.Headers["Authorization"] = "Basic " + basicAuthToken;
wb.Headers[HttpRequestHeader.ContentType] = "application/json";
return wb.UploadString(url, json);
}`