Sunday, August 21, 2022

Re: converting CURL command

In the past I've used subprocess.run to shell out and run curl. Those were weird circumstances though. Typically I use the requests library instead.

On August 21, 2022 2:27:02 PM PDT, "lone...@gmail.com" <lonesoac0@gmail.com> wrote:
Hello all,

   I am interested in converting the CURL command of:

curl 'https://www.walmart.com/chcwebapp/api/receipts' \ -H 'sec-ch-ua: "Chromium";v="98", " Not A;Brand";v="99", "Google Chrome";v="98"' \ -H 'accept: application/json' \ -H 'Referer: https://www.walmart.com/receipt-lookup' \ -H 'content-type: application/json' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36' \ -H 'sec-ch-ua-platform: "Mac OS X"' \ --data-raw '{"storeId":"123","purchaseDate":"02-19-2022","cardType":"visa","total":"100.00","lastFourDigits":"1234"}' \ --compressed

to a management command in Django.  Anyone have any documentation on how to do this?

No comments:

Post a Comment