File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 32
32
def calling_function (request ):
33
33
# Fetch the token
34
34
token_response = requests .get (token_full_url , headers = token_headers )
35
- jwt = token_response .content
35
+ jwt = token_response .text
36
36
37
37
# Provide the token in the request to the receiving function
38
38
function_headers = {'Authorization' : f'bearer { jwt } ' }
39
39
function_response = requests .get (function_url , headers = function_headers )
40
40
41
- return function_response .content
41
+ return function_response .text
42
42
# [END functions_bearer_token]
Original file line number Diff line number Diff line change 19
19
20
20
21
21
class Response (object ):
22
- def __init__ (self , content = u'' ):
23
- self .content = content
22
+ def __init__ (self , text = u'' ):
23
+ self .text = text
24
24
25
25
26
26
@mock .patch ("main.requests" )
You can’t perform that action at this time.
0 commit comments