Skip to content

Instantly share code, notes, and snippets.

@codian
Created May 8, 2012 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codian/2633214 to your computer and use it in GitHub Desktop.
Save codian/2633214 to your computer and use it in GitHub Desktop.
Common API Response Layout
/*
공용 API 응답 형식
-----------------
* metadata를 위한 별도 필드는 정하지 않음
* result는 반드시 해시
* 'status' 가 에러인 경우 더 자세한 에러 정보는 'result' 필드에 지정
*/
{
'status': 'Success', // 실행 결과 코드 또는 에러 이름
'message': 'blah blah', // 실행 결과 메시지. i18n이 적용된 읽을 수 있는(human readable) 메시지
'result': { ... } // 실행 결과. 실행한 API에서 정의한 결과
}
@codian
Copy link
Author

codian commented May 8, 2012

@steadiest 가 'message' 가 항상 있을 정도로 유용하지 않다는 의견 줌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment