关于GET请求Django的REGEX

时间:2014-02-17 14:47:42

标签: django curl django-views

curl --data "value=Mi8h1LdXFbbNnxZp+hgKLA==&key=TheBestSecretKey+" http://domain.com:8888/api/request_back/

**VIEWS.py**
print request.POST.get('value'),request.POST.get('key')

Mi8h1LdXFbbNnxZp hgKLA== TheBestSecretKey

urls.py
url(r'^api/request_back/$', request_back ,name='request_back'),

我没有得到值的PLUS正则表达式。如何可能

1 个答案:

答案 0 :(得分:2)

尝试使用此--data-urlencode

curl --data-urlencode "value=Mi8h1LdXFbbNnxZp+hgKLA==" --data-urlencode "key=TheBestSecretKey+" http://domain.com:8888/api/request_back/"