diff options
Diffstat (limited to 'day7/utils.py')
| -rw-r--r-- | day7/utils.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/day7/utils.py b/day7/utils.py index c58c014..c17a02d 100644 --- a/day7/utils.py +++ b/day7/utils.py @@ -2,10 +2,11 @@ import re from time import strftime, gmtime from string import ascii_letters -BAD_REQUEST = 'HTTP/1.1 400 Bad Request' -NOT_FOUND = 'HTTP/1.1 404 Not Found' -SUCCESS = 'HTTP/1.1 200 OK' -METHOD_NOT_ALLOWED = 'HTTP/1.1 405 Method Not Allowed' +HTTP_VERSION = 'HTTP/1.1' +SUCCESS = f'{HTTP_VERSION} 200 OK' +BAD_REQUEST = f'{HTTP_VERSION} 400 Bad Request' +NOT_FOUND = f'{HTTP_VERSION} 404 Not Found' +METHOD_NOT_ALLOWED = f'{HTTP_VERSION} Method Not Allowed' HTTP_METHODS = ['GET', 'POST', 'OPTIONS', 'HEAD', 'PUT', 'PATCH', 'DELETE', 'TRACE', 'CONNECT'] |