0
我怎樣才能定製的WebAPI像狀態,數據,消息JSON格式2響應像狀態定製的WebAPI響應,數據,消息甲酸
成功請求:
{
"status": "success",
"data": {
/* Application-specific data would go here. */
},
"message": null /* Or optional success message */
}
失敗請求:
{
"status": "error",
"data": null, /* or optional error payload */
"message": "Error xyz has occurred"
}