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
-
Welcome!
And what would be best practice then? And how else would you send JSON? Or are we not talking web APIs? -
@illegaldisease In an HTTP body? You know that even though there is encoding and media types, you still have to parse it, right?
-
@ScriptCoded Of course we have to parse it. Way better and convenient than trying to parse a string into an object. I know it will increase the body size, but having it 300 more bytes won't matter much when we are dealing with gigabit bandwidths.
I am currently dealing with an API, who converts token to cookie, and they send the cookie as a whole string. I used another module to parse it effectively, which wouldnt be needed at all. -
@illegaldisease Ehh... So that'd be payload > token > cookie > token > payload? Seems dumb, yeah...
Th frustration when you get a strignified json from a third party api, they say that's the best practice. Fml
rant