On Monday, April 4, 2016 at 3:11:15 PM UTC+2, Adrian Albu wrote: > > Yes but the problem is that they were using an old api that somehow worked > with this type of call and my new api has new REST calls but should work > also with the old ws type of calls, so when I did it I had example calls > and didn't see they also can use some with & instead of &. > > Old api was in php and they didn't have this problem, it seems. > > To tell them now they have to change the way they did some calls is a bit > hard because of political shit. > > >>>>
Yes, I understand this part, it can be. But what did the PHP API look like - you do have access to that? Go see how they parsed the url. Then I'd advise something like this (that's what I would do): - if the PHP API does something weird: 1. Copy the weird behavior in your new API - add it to a simple middleware that fixes URL params. 2. Place your new, proper route under `/api/v2/call` 3. Put your middleware and then the new API endpoint under `/api/v1/call`. (Or some variation of that). Then you can tell them - "hey, our old API was defective in this way, sorry you had to use that behavior. It's now under legacy endpoint there, but you can use proper calls here, we'll be developing new stuff under there in future." If PHP API didn't do weird stuff and if it's simply weird in itself, then just write a parser for the req.url as a middleware which extracts your needed params. I'd still keep the legacy/v2 approach though. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/30020e01-6eb3-47a0-9bf1-177a8e6083ec%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
