示例#1
0
 def post(self, product: Product):
     response = requests.post(url=self.ECONOMIC_URL,
                              data=product.to_json(),
                              headers=self.headers)
     return response
示例#2
0
 def put(self, product: Product):
     self.ECONOMIC_URL += '/' + product.product_number
     response = requests.put(url=self.ECONOMIC_URL,
                             data=product.to_json(),
                             headers=self.headers)
     return response