gohub.http 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. ### POST /signup/phone/exist 注册手机号是否已存在
  2. POST {{base_url}}/v1/auth/signup/phone/exist HTTP/1.1
  3. Content-Type: application/json
  4. {
  5. "phone": "15968875425"
  6. }
  7. ### POST /signup/email/exist 注册邮箱是否已存在
  8. POST {{base_url}}/v1/auth/signup/email/exist HTTP/1.1
  9. Content-Type: application/json
  10. {
  11. "email": "ynwdlxm@163.com"
  12. }
  13. ### POST /verify_code/captcha 图片验证码
  14. POST {{base_url}}/v1/auth/verify_code/captcha HTTP/1.1
  15. Content-Type: application/json
  16. ### POST /verify_code/phone 发送手机验证码
  17. POST {{base_url}}/v1/auth/verify_code/phone HTTP/1.1
  18. Content-Type: application/json
  19. {
  20. "phone": "15968875425",
  21. "captcha_id": "captcha_skip_test",
  22. "captcha_answer": "123456"
  23. }
  24. ### POST /verify_code/email 发送邮箱验证码
  25. POST {{base_url}}/v1/auth/verify_code/email HTTP/1.1
  26. Content-Type: application/json
  27. {
  28. "email": "summer@example.com",
  29. "captcha_id": "captcha_skip_test",
  30. "captcha_answer": "123456"
  31. }
  32. ### 注册用户
  33. POST {{base_url}}/v1/auth/signup/using-phone HTTP/1.1
  34. Content-Type: application/json
  35. {
  36. "name":"summer",
  37. "password":"secret",
  38. "password_confirm":"no_match",
  39. "verify_code": "123123",
  40. "phone": "00011059149"
  41. }
  42. ### 注册用户
  43. POST {{base_url}}/v1/auth/signup/using-email HTTP/1.1
  44. Content-Type: application/json
  45. {
  46. "name":"summer2",
  47. "password":"secret",
  48. "password_confirm":"secret",
  49. "verify_code": "123123",
  50. "email": "summer@testing.com"
  51. }
  52. ### 登录用户
  53. POST {{base_url}}/v1/auth/login/using-password HTTP/1.1
  54. Content-Type: application/json
  55. {
  56. "captcha_id" :"xTS6AtcgjUVABJj2M9NE",
  57. "captcha_answer": "338750",
  58. "login_id": "summer@testing.com",
  59. "password": "secret"
  60. }
  61. ### 刷新token
  62. POST {{base_url}}/v1/auth/login/refresh-token HTTP/1.1
  63. Authorization: Bearer {{access_token}}
  64. Content-Type: application/json
  65. {}
  66. ### /test_auth 测试认证
  67. GET {{base_url}}/test_auth HTTP/1.1
  68. Authorization: Bearer {{access_token}}
  69. ### /test_gust 测试认证
  70. GET {{base_url}}/test_gust HTTP/1.1
  71. Authorization: Bearer {{access_token}}