-
Notifications
You must be signed in to change notification settings - Fork 15
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
How you can send parameters in GET requests? #9
Comments
I'm not sure I follow, do you mean |
Currently sending the parameters that way |
Ok. I've thought about this some. In the one-file case it's not worth introducing a new section as you actually need to type more. But in the cascading case where you have base-files and more specific files for different endpoints it does makes sense. An example is where you need to pass an API_KEY= to a bunch of endpoints as a query parameter. Since URL:s currently combine you need to specify that API_KEY in each of the last files pased to ain to get it in as a query-parameter. This leads to duplication. If there was a Same goes for any fragment in the URL. I'll flesh out the details in the coming days. |
So, I've added a [Query] section in ain v1.2.0. You can read up on the syntax here: https://github.com/jonaslu/ain#query Note that parameters are written as they would be in an url with an equals sign (and whitespace within the key is significant):
It turns out i TIL that fragments are a client-side thing only and curl, wget and httpie ignores any fragment in the url, so I won't be doing those in the same way. |
Oh, and thanks for the input.. 👍 |
Thank you very much for including the new [Query] section 😀 |
No problem. I changed so whitespace is not significant in the [Query] section in version v1.2.1 So these two are the same in v1.2.1 and onwards:
|
excellent, now i update ain |
Please can you send a section where you can add the parameters that are GET requests
example
The text was updated successfully, but these errors were encountered: