POST Template - Goldfish-Server/3sec-Goldfish GitHub Wiki

λ©”μ†Œλ“œ 경둜 λ·° μš”μ²­ 사항
POST /post/:QuestionIdx μƒˆ κ²Œμ‹œκΈ€ μž‘μ„±ν•˜κΈ°

↗️ Request Header

{
    "Content-Type":"multipart/form-data; boundary=<calculated when request is sent>",
    "jwt":"jwdlsakgtoetaseldkj"
}

↗️ Request Body

form-data

key ν˜•μ‹ μ„€λͺ…
image file μ‚¬μ§„νŒŒμΌ
postString STRING μ„€λͺ…

β†˜οΈ Response

πŸ”΅ success

{
    "status": 200,
    "success": true,
    "message": "이미지 ν¬ν•¨λœ λ‹΅λ³€ μΆ”κ°€ μ™„λ£Œ"
}

❌ Fail

  • 토큰 만료
{
    "status": 401,
    "success": false,
    "message": "토큰 값이 λ§Œλ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€."
}
  • μ„œλ²„ μ—λŸ¬
{
    "status": 500,
    "success": false,
    "message": "μ„œλ²„ λ‚΄λΆ€ μ—λŸ¬"
}