Hello, I'm a newbie in the world of grpc and coding. If my question is ridiculous, I apologize in advance.
Question: There is a token that we have defined in X. And I have to decide whether to run transactions using this token. I can receive the incoming request correctly, but I don't know how to access the headers part of this request. Is it possible to reach the variable that I define the request by typing ".headers" as in the RESTFUL API architecture? What should I do? Can you help me?
Thank You, Good Work
If I need to share my code block:
` def UDTForegroundApp(self, request, context):
apiRequest = {
"Token": I need to put the token in the request here
....
....
....
....
}
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
requests.post('http://*****/api/auth/save-application', data=json.dumps(apiRequest), headers=headers)
return generatedProtos.application_pb2.DTForegroundAppResponse(ret_complete = services.config.foreground_application_ret_complete) `