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) `

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/018258c9-8062-456e-a327-1e1b0eac8070n%40googlegroups.com.

Reply via email to