Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Translating curl to python urllib2

Can someone please show me how to convert this curl call into call using python urllib2

curl -X POST
-H "Content-Type:application/json"
-d "{\"data\":{}}"
-H "Authorization: GoogleLogin
auth=0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789...XYZ"
https://www.googleapis.com/prediction/v1/training?data=${mybucket}%2F${mydata}
like image 487
josephmisiti Avatar asked Feb 06 '26 15:02

josephmisiti


1 Answers

Found it here:

http://blog.notdot.net/2010/06/Trying-out-the-new-Prediction-API

like image 124
josephmisiti Avatar answered Feb 09 '26 09:02

josephmisiti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!