The Get, Get request key words in requests library documentation does not provide any examples where user credentials/AUTH_TOKEN and other arguments passed in the API call.
1 Answer
As Bryan pinted, the examples are in the libraries tests.
For basic authentification, there is:
Get With Auth
[Tags] get get-cert
${auth}= Create List user passwd
Create Session httpbin https://httpbin.org auth=${auth} verify=${CURDIR}${/}cacert.pem
${resp}= Get Request httpbin /basic-auth/user/passwd
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As Strings ${resp.json()['authenticated']} True
If you get No keyword with name 'Create Session' found., that means that you are not importing the library correctly or not having it installed correctly.
If you just running the testcase.txt, wrong import is the most like reason. It imports the keywords directly from the source file in author's local repository, instead of installed library package:
Library ../src/RequestsLibrary/RequestsKeywords.py
Instead, import it like in the examples in the librarie's GIT homepage/readme.MD
Library RequestsLibrary
If there is issue with installation, just do:
pip install -U requests
pip install -U robotframework-requests
Create Session not found, since that keyword is created by that library. Please provide a minimal reproducible example.