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)
Fecha
import datetime f"{datetime.datetime.now():%Y%m%d_%H%M%S}" '20191015_212507'
informatica/linux/python.1571128222.txt.gz · Last modified: 2019/10/15 08:30 by jose