HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🧚
[1기]최종 프로젝트 데브코스
/
[팀12] 기부니🧡
[팀12] 기부니🧡
/
🧡
API 설계
/
📢
요청/응답 값
📢

요청/응답 값

HTTP verbs
PUT
Path
/wishes/{id}
기능
기부요청글 정보수정
담당자
부희
도메인
완료
완료

Swagger 에서 테스트를 못해요. Postman 에서 해주세요.


postman 에서 헤더에 토큰 설정하는 방법
notion image
notion image

PUT /wishes/{id} → 센터만 접근가능


id ⇒ 기부 요청글 정보 수정을 원하는 게시글 식별자 아이디 값
 

요청 값


// HTTP PUT /wishes/1 HTTP/1.1 Host: localhost:8080 Authorization: Bearer 로그인 후 발급된 토큰 Content-Length: 537 Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW ----WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="rabbit.png" Content-Type: image/png (data) ----WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file"; filename="mask.png" Content-Type: image/png (data) ----WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="request" Content-Type: application/json { "category":"재능기부", "content": "기부원해요", "tags": [ 1,2 ], "title": "재능 기부" } ----WebKitFormBoundary7MA4YWxkTrZu0gW // CURL curl --location --request PUT 'http://localhost:8080/donations/1' \ --header 'Authorization: Bearer 로그인 후 발급된 토큰' \ --form 'file=@"/Users/buli/images/rabbit.png"' \ --form 'file=@"/Users/buli/images/mask.png"' \ --form 'request="{ \"category\":\"재능기부\", \"content\": \"기부원해요\", \"tags\": [ 1,2 ], \"title\": \"재능 기부\" }";type=application/json'

응답 값(200)


{ "data": 1, // 해당 게시글의 식별자 아이디 반환 "message": "success" }