Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API is not RESTful #1

Open
kvakes opened this issue Dec 11, 2015 · 1 comment
Open

API is not RESTful #1

kvakes opened this issue Dec 11, 2015 · 1 comment

Comments

@kvakes
Copy link

kvakes commented Dec 11, 2015

I noticed is that all the calls in the examples on the first page are POST requests, which is not very RESTful. What is the logic behind that? Is it a limitation inflicted by NDC? I'd prefer this:

curl -X GET https://sandbox.yepjet.com/v1/search?type=flights&from=LHR&to=JFK&departure=2016-01-01
@yawnt
Copy link
Contributor

yawnt commented Dec 11, 2015

yep, you're absolutely right.. GET should be the right one
it's POST right now because /search should support open-jaws (eg: searching for multiple flights, from A to B, to C to D, to D to E) which means that the GET query should look something like

/search?flights[0][from]=LHR&flights[0][to]=JFK...
       &flights[1][from]=JFK&flights[1][to]=FCO..

and so on

the web framework that we use doesn't currently support those parameters, so I've been writing my own query parser, but I couldn't make it in time for the release
thank you for opening the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants