This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Convert a Django HTTPRequest object (or dictionary of such a request) into a | |
cURL command. | |
""" | |
def get_curl(request): | |
def convert(word, delim='-'): | |
return delim.join(x.capitalize() or '_' for x in word.split('_')) | |
def get_headers(request): | |
headers = { |