Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. #-*- coding: utf8 -*-
  2. import requests
  3.  
  4. s = requests.Session()
  5.  
  6. payload = 'antofa_field1=Hello test2' # open('product.json', 'rb').read()
  7. headers = {'content-type': 'application/x-www-form-urlencoded'}
  8.  
  9. r = s.put('https://astore:w3LjfUEa6jbsPvveKo1wWeJtuTnryDeF@api.schema.io/astore.com.products/58497f446e913f3276561c47', data=payload, headers=headers)
  10. print r
  11. open('page.htm', 'wb').write(r.content)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement