Forum Discussion
Hi,
> how can we do the following flows
I would recommend to take a look at the aqHttp object in TestComplete (https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqhttp/index.html).
- Sadeesh4 years agoNew Contributor
AlexKaras Thanks for your reply and as I mentioned, I need to deal with multipart/form-data requests but I didn't see any appropriate method in the interface https://docs.microsoft.com/en-gb/windows/win32/winhttp/iwinhttprequest-interface?redirectedfrom=MSDN which used byaqHttp object.
So only moved on to ReadyAPI.
- Sadeesh4 years agoNew Contributor
Thanks, AlexKaras for the kind update.
Here are the sample cURL requests
//POST request
1. curl --location --request POST 'URL/oauth/token' \
--header 'Cookie: "XXXXXXXXX"' \--form 'VAR1="VALUE1"' \--form 'VAR2="VALUE2"' \--form 'VAR3="VALUE3"' \--form 'VAR4="VALUE4"'//subsequent GET request where the output value from POST request will be referred2. curl --location --request GET 'XXXX/create-data' \--header 'X-OAuth-Authorization:
: "token value from the above request"' \--header 'Content-Type: application/json' \--header 'Accept: application/json' \--header 'Cookie: XXXXXX'//final response where the "VALUE6" needs to grabbed and pass to UI testsResponse:{"status": 200,"body": {"VAR5": "VALUE5","VAR6": "VALUE6",....}}Notes:1. Though as mentioned in the document, This type of form-data request can be achieved without ReadyAPI with third-party requests package especially in python-script but I also saw a note in Python script documentation that dealing with third-party packages are not the recommended approach as it is not stable during execution.2. Since having cURL requests and seems this is possible without ReadyAPI Integration by referring following threads: - AlexKaras4 years agoChampion Level 3
Hi,
Can you provide sample request and expected response that you need to execute?
I am not sure that properties from ReadyAPI can be shared into TestComplete project, but I am pretty sure that property can be saved into file and then TestComplete can read the content of this file.
Related Content
- 4 years ago
Recent Discussions
- 19 minutes ago
- 3 hours ago
- 3 days ago