Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
bioDan56222yBusiness people who underate their development efforts (usually in the form of economic compensation) by overating productivity deserve this
-
mr-user13492yI am writing my API constant like the example given by OP.
Could you please tell what is wrong with it so I can fix it? Should I put it in .env file? -
@mr-user .... its the same endpoint, 3 times in row...and use the searchparam API to build the search parameters dynamically and call it a day
-
mr-user13492y@fullstackclown
So I should only have 1 constant /api/GetUsers and the rest should be dynamically build by function/method. In other word ?token and ?Query should be inside a function? -
@mr-user I mean, that's the most DRY (and flexible) way to do it in my opinion, but what do I know, I'm just a clown 🤡
DRY here standing for the adage "Don't Repeat Yourself"
Related Rants
Hello fellow devRanters, look what I found in our API constants on this fine day!
LIST_USERS: '/api/GetUsers',
USERS_WITH_QUERY:'/api/GetUsers?Query=',
MORE_USERS: '/api/GetUsers?Token=',
You get what you pay for, you get what you pay for, you get what you- AAAAAAAAAAAAAAAAAAAARRRGGGGG!!!!!!!!!
rant
kiss
overcomplicate
🤡
clowndrivendevelopment
overengineered
cdd
clowntown