Coverage for gramex\http.py: 100%

# Coverage for gramex\http.py : 100%

## 52 statements 52 run 0 missing 0 excluded 0 partial

Hot-keys on this page

r m x p toggle line displays

j k next/prev highlighted chunk

0 (zero) top of page

1 (one) first highlighted chunk

1'''

2 Standard (and some non-standard) HTTP codes.

3 We don't use six.moves.http_client because it doesn't contain codes like:

4 CLIENT_TIMEOUT, RATE_LIMITED, TOO_MANY_REQUESTS. Here, we add them all.

5'''

6

7# status codes

8# informational

9 CONTINUE = 100

10 SWITCHING_PROTOCOLS = 101

11 PROCESSING = 102

12

13# successful

14 OK = 200

15 CREATED = 201

16 ACCEPTED = 202

17 NON_AUTHORITATIVE_INFORMATION = 203

18 NO_CONTENT = 204

19 RESET_CONTENT = 205

20 PARTIAL_CONTENT = 206

21 MULTI_STATUS = 207

22 IM_USED = 226

23

24# redirection

25 MULTIPLE_CHOICES = 300

26 MOVED_PERMANENTLY = 301

27 FOUND = 302

28 SEE_OTHER = 303

29 NOT_MODIFIED = 304

30 USE_PROXY = 305

31 TEMPORARY_REDIRECT = 307

32

33# client error

34 BAD_REQUEST = 400

35 UNAUTHORIZED = 401

36 PAYMENT_REQUIRED = 402

37 FORBIDDEN = 403

38 NOT_FOUND = 404

39 METHOD_NOT_ALLOWED = 405

40 NOT_ACCEPTABLE = 406

41 PROXY_AUTHENTICATION_REQUIRED = 407

42 REQUEST_TIMEOUT = 408

43 CONFLICT = 409

44 GONE = 410

45 LENGTH_REQUIRED = 411

46 PRECONDITION_FAILED = 412

47 REQUEST_ENTITY_TOO_LARGE = 413

48 REQUEST_URI_TOO_LONG = 414

49 UNSUPPORTED_MEDIA_TYPE = 415

50 REQUESTED_RANGE_NOT_SATISFIABLE = 416

51 EXPECTATION_FAILED = 417

52 RATE_LIMITED = 420

53 UNPROCESSABLE_ENTITY = 422

54 LOCKED = 423

55 FAILED_DEPENDENCY = 424

56 UPGRADE_REQUIRED = 426

57 TOO_MANY_REQUESTS = 429

58

59# server error

60 INTERNAL_SERVER_ERROR = 500

61 NOT_IMPLEMENTED = 501

62 BAD_GATEWAY = 502

63 SERVICE_UNAVAILABLE = 503

64 GATEWAY_TIMEOUT = 504

65 HTTP_VERSION_NOT_SUPPORTED = 505

66 INSUFFICIENT_STORAGE = 507

67 NOT_EXTENDED = 510

68 CLIENT_TIMEOUT = 599