I created a simple function to execute an Http PUT request -
public string checkIfUserExists(string userName)
{
var endPoint = new Uri("http://localhost:8080/jasperserver/rest_v2/users/"+userName);
var request = (HttpWebRequest)WebRequest.Create(endPoint);
request.Method = "PUT";
request.ContentType = "urlencoded";
var response = (HttpWebResponse)request.GetResponse();
return "Success";
}
when I execute this, I get an exception "Invalid URI: Invalid port specified" at the line -
var endPoint = new Uri("http://localhost:8080/jasperserver/rest_v2/users/"+userName);
Any ideas for fixing this? Is the problem with localhost:8080 portion of the URL?