converting CURL command

54 views
Skip to first unread message

lone...@gmail.com

unread,
Aug 21, 2022, 5:27:02 PM8/21/22
to Django users
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?

Sebastian Jung

unread,
Aug 21, 2022, 6:33:38 PM8/21/22
to django...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/53723979-3323-4563-9799-9091354d87a9n%40googlegroups.com.

Ryan Nowakowski

unread,
Aug 21, 2022, 10:42:16 PM8/21/22
to django...@googlegroups.com
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.
Reply all
Reply to author
Forward
0 new messages