informatica:linux:python
This is an old revision of the document!
PUT
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import requests, json, sys
url = 'http://tomcat-1.dev.local.jamgo.org:8080/location-server/resources/category'
data = {
"id": 1,
"name": "Textil, calcat i moda update update 6",
"description": "",
"type": None,
"parent": None,
"customerCount": 94,
"iconPath": None
}
headers = {'content-type': 'application/json'}
r = requests.put(url, data=json.dumps(data), headers=headers)
print r.status_code
print(r.text)
informatica/linux/python.1426770518.txt.gz · Last modified: (external edit)
