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
Add a POST parameter in the FileDownloader processing algorithm #44867
Conversation
@Gustry A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged. Please update the description (not the comments) with helpful description and screenshot to help the work from documentors. Thank you! |
@Gustry , nice feature addition. I would suggest moving both the method and data parameters within a collapsible advanced group box. IMHO, that'll be a better UI for most people. |
f7e224a
to
c107e63
Compare
All comments are done, thanks for the review. |
c107e63
to
a5ec688
Compare
@Gustry |
false, | ||
QStringLiteral( "GET" ) | ||
); | ||
methodParam->setHelp( QObject::tr( "The HTTP method to use for the request" ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gustry is this a new feature in Processing or just an old feature nobody uses? From a user (and writer) pov, this could be quite helpful in many contexts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's indeed a new "mini" feature. Before, all requests were "GET". Now, you can use POST and also add a BODY parameter when it's POST.
For instance, you can make a POST query to the OSM Overpass server, with a very long query in the BODY. Before, with GET, you might have reached the limit of characters in a GET request.
Is-that OK ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Gustry Actually I was talking about the ability to add a description to a parameter (the setHelp method). I'm not sure I noticed it earlier in another algorithm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry.
It's a new feature from QGIS 3.16:
https://qgis.org/en/site/forusers/visualchangelog316/index.html#add-help-string-for-parameters
Not very used, but quite convenient indeed to add a longer description instead of adding a lot of text in the main algorithm description.
Add a the choice between GET or POST when downloading a file
If POST, some DATA can be added in the query.
This will be useful to send a longer Overpass request using POST to download OSM data.
Funded by 3Liz https://www.3liz.com