Hello friends, I have a problem with an automation where used python, the dbe code make a graphq query and return the result, under the python IDE the code works without problem, but in uipath it presents a problem.
This is the code.
def add():
import requests
url = “http://swapi.apis.guru/”
payload = "{\"query\":\"{\\r\\n person(personID: 4) {\\r\\n name\\r\\n birthYear\\r\\n }\\r\\n}\\r\\n\",\"variables\":{}}"
headers = {
'Content-Type': 'application/json'
}
respuesta = requests.request("GET", url, headers=headers, data = payload)
return respuesta.text.encode('utf8')