Skip to content
Snippets Groups Projects
Commit 19a79fa6 authored by Christoffer Stoll's avatar Christoffer Stoll
Browse files

python example

parent e511b177
No related branches found
No related tags found
1 merge request!24python example
......@@ -20,10 +20,20 @@ This can configured within the Raven website
Set the bearer token as authorization
Attach the csv file as `form-data` with the key `file`
**Curl example**
**Curl syntax**
```bash
curl -i -X POST -H "Authorization: Bearer <MY_TOKEN>" -F 'file=@<MY_FILE_CSV>' <MY_DOMAIN>
curl -i -X POST -H "Authorization: Bearer <MY_TOKEN>" -F 'file=@<MY_FILE_CSV>' <MY_URL>
```
**Python code**
```python
import requests
headers = {'Authorization': f'Bearer {<MY_TOKEN>}'}
files = {'file': open("<MY_FILE_CSV>", 'rb')}
response = requests.post(<MY_URL>, files=files, headers=headers)
```
### Authorities
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment