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

Wrong query string handling #58

Closed
Art4 opened this issue May 27, 2015 · 4 comments
Closed

Wrong query string handling #58

Art4 opened this issue May 27, 2015 · 4 comments
Labels

Comments

@Art4
Copy link

Art4 commented May 27, 2015

Drakov seems to still have problems with query string parameters. As you can see in this build Drakov should register these 3 Urls from the Blueprint API file.

GET /index.php?action=stats&cat=account # Retrieve the account stats
GET /index.php?action=stats&cat=forum # Retrieve the forum stats
GET /index.php?action=stats&cat=groups # Retrieve the groups stats

The first request runs well, but at the second and third request Drakov returns the wrong responses.

1st request: All right

[LOG] GET /index.php?action=stats&cat=account
[DRAKOV] GET /index.php?action=stats&cat=account Retrieve the account stats

2nd and 3rd request: Returns the first response?

[LOG] GET /index.php?action=stats&cat=forum
[DRAKOV] GET /index.php?action=stats&cat=account Retrieve the account stats
[LOG] GET /index.php?action=stats&cat=groups
[DRAKOV] GET /index.php?action=stats&cat=account Retrieve the account stats

Is this a bug or am I doing something wrong? Oh, and please don't judge me for these crappy urls. 😔 They came from a legacy project and will hopefully change in near future.

@yakovkhalinsky
Copy link
Contributor

hi @Art4 drakov doesn't really understand query parameter values yet, although it is on our roadmap.

Unfortunately it is only matching the keys in your query string.

@yakovkhalinsky
Copy link
Contributor

Am closing this as this is expected behaviour.

@Art4 let me know if you have any other questions about this issue 👍

@Art4
Copy link
Author

Art4 commented Jun 2, 2015

Why it is necessary for drakov to understand the query parameters? I thought the url and the response could be stored in an arraylike way.

Url_with_querystring => API blueprint response

@yakovkhalinsky
Copy link
Contributor

have a look at our Blueprint API file that we use to test the functionality:
https://github.com/Aconex/drakov/blob/master/test/example/md/query-parameters.md

Drakov only sees ?action&cat

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

No branches or pull requests

2 participants