1
00:00:00,337 --> 00:00:03,480
Instructor: Now when discussing response code

2
00:00:03,480 --> 00:00:07,320
it's important to note they are divided into groups

3
00:00:07,320 --> 00:00:11,326
and there are actually five groups of response codes

4
00:00:11,326 --> 00:00:16,020
and each group represent a specific response type.

5
00:00:16,020 --> 00:00:20,100
So there is a group for success response codes

6
00:00:20,100 --> 00:00:24,000
and there is a group for error response codes, et cetera.

7
00:00:24,000 --> 00:00:28,020
Now each group consists of three digit status codes.

8
00:00:28,020 --> 00:00:29,280
So all the status codes

9
00:00:29,280 --> 00:00:33,405
that we are dealing with are always consist of three digits

10
00:00:33,405 --> 00:00:37,710
and each group has its own first digit.

11
00:00:37,710 --> 00:00:40,140
So you will see groups that start

12
00:00:40,140 --> 00:00:42,930
with one, with two, et cetera.

13
00:00:42,930 --> 00:00:46,410
So let's discuss the various groups of response code.

14
00:00:46,410 --> 00:00:49,200
So the first group is the group that starts

15
00:00:49,200 --> 00:00:52,410
with one and all the status code that starts

16
00:00:52,410 --> 00:00:55,983
with one represent informational response.

17
00:00:57,060 --> 00:01:00,300
The next group is the group that starts with two

18
00:01:00,300 --> 00:01:05,300
and all status code that starts with two represent success.

19
00:01:05,760 --> 00:01:10,023
The next one is three, represent redirection.

20
00:01:11,070 --> 00:01:16,070
Next come the fours that represent client errors.

21
00:01:16,500 --> 00:01:18,840
And the last one are the fives

22
00:01:18,840 --> 00:01:21,400
that represent server errors.

23
00:01:21,400 --> 00:01:24,960
Now the first one, the informational response,

24
00:01:24,960 --> 00:01:26,940
you should not use it.

25
00:01:26,940 --> 00:01:28,320
It is there only

26
00:01:28,320 --> 00:01:31,620
for informational purpose and no one is using it.

27
00:01:31,620 --> 00:01:34,290
So you should also avoid this group.

28
00:01:34,290 --> 00:01:36,344
In addition, the three group,

29
00:01:36,344 --> 00:01:38,970
the redirection is usually implemented

30
00:01:38,970 --> 00:01:41,610
by low level components such as whip server,

31
00:01:41,610 --> 00:01:43,710
operating systems and so on.

32
00:01:43,710 --> 00:01:47,490
You will rarely use this group in your API code.

33
00:01:47,490 --> 00:01:49,129
So for our discussion

34
00:01:49,129 --> 00:01:52,170
we will simply ignore those two groups

35
00:01:52,170 --> 00:01:54,240
and we will discuss those three,

36
00:01:54,240 --> 00:01:58,920
the success, client errors, and server errors.

37
00:01:58,920 --> 00:02:01,743
So let's begin with the success.

