Forum Discussion
scot1967
Champion Level 3
19 days agoHi rachellawrence,
I hope you are doing well. The link rraghvani posted is what I have used with this type of work. If you are working with an API extensively I would recommend looking at SOAP UI or Ready API. The methods available in TestComplete are very limited in comparison.
function sendGetRequest() {
// This is a call using the aqHttp helper object. It is limited and will not return large datasets.
let url2 = "https://api.XXXXXXX.com/InventoryManagement/ReceivingGridSelect?PurchasingDocument=1111";
let request = aqHttp.CreateGetRequest(url2);
let response = request.Send();
if (response.StatusCode == 200) {
Log.CheckPoint("Response received: " + response.Text);
} else {
Log.Error("Request failed with status: " + response.StatusCode);
}
}
... If you find my posts helpful drop me a like! 👍 Be sure to mark the solution to help others out and to give credit the person who helped you. 😎