Posts

Showing posts with the label backend

REST API Best practice ? return Empty object vs no object

5 The bounty expires in 16 hours . Answers to this question are eligible for a +50 reputation bounty. maaz is looking for an answer from a reputable source . let's say i have an API that returns users wallet balance and List of wallet transactions which is going to expiry response = { user_balance: 20 expiring_credits : [ {object 1 } {object 2} ] } in case if user dont have any expiring transactions we can format respose in 2 ways option 1 response = { user_balance: ...