I essentially want to do this:
curl -X POST "http://URL?u=user&p=password" --data-binary @myconfig.json
with urllib2.
I found examples for sending just the user and password, or just the binary, but not both at the same time, and some contradict each other.
I am doing this to create an influxdb with a retention policy based on instructions here:
https://docs.influxdata.com/influxdb/v0.8/advanced_topics/sharding_and_storage/
curl -X POST "http://localhost:8086/cluster/database_configs/mydb?u=root&p=root" --data-binary @myconfig.json
Thanks!