소스 검색

Update README.md

Matt Coles 9 년 전
부모
커밋
d22e61af10
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      README.md

+ 4 - 4
README.md

@@ -44,14 +44,14 @@ Returns "Hello :name!" or simply "Hello World!" if no name is present. :)
44 44
 ### /register/
45 45
 In order to register a new user account, a `POST` request should be sent, with
46 46
 the following data:
47
-```
47
+```json
48 48
 {
49 49
     "user": desired_username_here,
50 50
     "password": desired_password_here
51 51
 }
52 52
 ```
53 53
 The server will then respond with a JSON object that looks something like this:
54
-```
54
+```json
55 55
 {
56 56
     "registered": 1, // Value is 1 or 0 based on whether registration was
57 57
     successful
@@ -64,7 +64,7 @@ The value of the error code will be `1` if the username already exists.
64 64
 ### /login/
65 65
 In order to log into an account, or essentially request a new authentication
66 66
 token, a `POST` request should be sent with the following data:
67
-```
67
+```json
68 68
 {
69 69
     "user": username_here,
70 70
     "password": password_here, // Optional field if auth-key is present
@@ -74,7 +74,7 @@ token, a `POST` request should be sent with the following data:
74 74
 Using the auth-key will reset and generate a new authentication key, whereas
75 75
 password will simply get the current auth-key. In either case the following data
76 76
 will be returned:
77
-```
77
+```json
78 78
 {
79 79
     "logged_in": 1, // Value is 1 or 0 whether or not the login was successful
80 80
     "auth-key": $2a$10$.X9YrNyd2R7b2ycAumHn.ONiINs2bCkRDupugu6sjZkUkPmXSaSra, // Only present if logged_in == 1, to be used in API requests