Hi @Sandeep_S
Is the following what you’re looking for, to perform a get request
token = 'xxxxxxxxxx'
r = requests.get(
'https://url-address/',
headers={
'accept': 'application/xxxxxx',
'authorization': 'token {}'.format(token)} )
Hope this helps!
Hi @dataprofessor Thanks for your reply on my question. I am using st.file_uploader function to upload a file which is making internal call to ‘_stcore/upload_file’ end point (https://app.com/_stcore/upload_file). I need to intercept this request and add a token to it for authentication. Is there a way to do that?
Hi
Yes you can take the uploaded file and convert it to a binary format and use that as input for your requests query
Sorry, I am still not sure on how to pass token in http header to streamlit upload function.