Rest API Request is empty
Dear all,
this is a repeated question with some more things to ask,
I have been working with the integration of TestComplete with YouTrack.
so far i have been successful with creating a new issue in youtrack through a test run from testcomplete.
however, the issue i am still facing is uploading the attachment along with creating the issue.
any help would be great.
the aqHttpRequest.set header has no effect in the response when checked in the log message.
why is my request not being effected?
also the user name and password is not working as well it creates the issue as aguest user even when i am giving it the user name and password.
below is my code:
function httpPostRequest()
{
project=ABC&summary=new+issue&description=description+of+new+issue";
var address = "http://URL/rest/issue?project=ABC&summary=new+issue&description=Description+of+new+issue&attachment=D:\\Newfolder\\b.jpg";
var username = "user@abc.com";
var password = "userabc";
var requestBody = '1';
var aqHttpRequest = aqHttp.CreatePostRequest(address, username, password);
aqHttpRequest.SetHeader("Content-Type", "application/json");
var aqHttpResponse = aqHttpRequest.Send()
Log.Message(aqHttpResponse.StatusCode); // A status code
Log.Message(aqHttpResponse.Text); // A body
aqHttpResponse.SaveToFile("D:\\Postbody.txt");
}
this creates the issue but does'nt upload the attachment.