OLD | NEW |
1 def main(request, response): | 1 def main(request, response): |
2 if request.headers.get('Content-Type') == 'application/x-www-form-urlencoded
': | 2 if request.headers.get('Content-Type') == 'application/x-www-form-urlencoded
': |
3 if request.body == 'foo=bara': | 3 if request.body == 'foo=bara': |
4 return 'OK' | 4 return 'OK' |
5 else: | 5 else: |
6 return 'FAIL' | 6 return 'FAIL' |
| 7 elif request.headers.get('Content-Type') == 'text/plain': |
| 8 if request.body == 'qux=baz\r\n': |
| 9 return 'OK' |
| 10 else: |
| 11 return 'FAIL' |
7 else: | 12 else: |
8 if request.POST.first('foo') == 'bar': | 13 if request.POST.first('foo') == 'bar': |
9 return 'OK' | 14 return 'OK' |
10 else: | 15 else: |
11 return 'FAIL' | 16 return 'FAIL' |
12 | 17 |
OLD | NEW |