1

I'm creating API endpoints for my app. Which of the following endpoint format is more 'standard'? In the example below I will be returning user id 'john' from my users table.

https://localhost:33170/api/users?id=john

OR

https://localhost:33170/api/users/?id=john

FYI, the following endpoint will return all users:

https://localhost:33170/api/users
user1034912
  • 2,153
  • 7
  • 38
  • 60

1 Answers1

1

It has been determined that it doesn't matter if the trailing slash is on or not.

I don't know of any framework that treats either case differently... Those two routes are identical in every framework I have ever used.

Andy
  • 12,859
  • 5
  • 41
  • 56