summaryrefslogtreecommitdiffstats
path: root/src/ogRest.py
blob: dfc382c0e082cbac767ed02ebe06f3fa880a9c7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from enum import Enum

class ogResponses(Enum):
	BAD_REQUEST=0
	IN_PROGRESS=1
	OK=2

def getResponse(response):
	if response == ogResponses.BAD_REQUEST:
		return 'HTTP/1.0 400 Bad request\r\n\r\n'
	if response == ogResponses.IN_PROGRESS:
		return 'HTTP/1.0 202 Accepted\r\n\r\n'
	if response == ogResponses.OK:
		return 'HTTP/1.0 200 OK\r\n\r\n'