Thanks for the answer. It is very helpful. On the other hand it gives the 400 Bad Request because the Enum that defines the sort parameter has value RECOMMENDORS instead of RECOMMENDERS.
Printable View
Thanks for the answer. It is very helpful. On the other hand it gives the 400 Bad Request because the Enum that defines the sort parameter has value RECOMMENDORS instead of RECOMMENDERS.
I've fixed this issue by changing RECOMMENDORS to RECOMMENDERS and by making some small changes to the parameter expansion routine to better handle placement of ampersands. I've tested it with the same criteria given above and it works fine.
That said, I'm not a big fan of how the parameter expansion code works and may revisit it to make it more solid.
Fare enough. Fell free to tart up as you see fit. It was very much a first attempt.
Just a word of warning though. I'd a lot of hassles with this area of the code as LinkedIn works differently to all the other Social Interfaces. They require GET parameters tacked on to the end of the request. In a number of cases the Spring Web RestTemplate was encoding the parameters and thus URL Encoding the &'s which caused the request to completely fail.
It would be ideal if you could extend the Spring Web RestOperations to fit your needs.
Make sure you test against the actual API (rather than unit tests) if you make changes here.