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

Add a POST parameter in the FileDownloader processing algorithm #44867

Merged
merged 1 commit into from Sep 3, 2021

Conversation

Gustry
Copy link
Contributor

@Gustry Gustry commented Aug 27, 2021

Add a the choice between GET or POST when downloading a file

If POST, some DATA can be added in the query.

Screenshot from 2021-08-27 15-16-24

This will be useful to send a longer Overpass request using POST to download OSM data.

Funded by 3Liz https://www.3liz.com

@github-actions github-actions bot added this to the 3.22.0 milestone Aug 27, 2021
@Gustry Gustry added Changelog Items that are queued to appear in the visual changelog - remove after harvesting Feature Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Processing Relating to QGIS Processing framework or individual Processing algorithms labels Aug 27, 2021
@github-actions
Copy link

@Gustry
This pull request has been tagged as requiring documentation.

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.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

src/core/network/qgsfiledownloader.h Outdated Show resolved Hide resolved
src/core/network/qgsfiledownloader.h Outdated Show resolved Hide resolved
src/core/network/qgsfiledownloader.h Outdated Show resolved Hide resolved
@nirvn
Copy link
Contributor

nirvn commented Aug 31, 2021

@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.

@Gustry
Copy link
Contributor Author

Gustry commented Sep 1, 2021

All comments are done, thanks for the review.

src/core/qgis.h Outdated Show resolved Hide resolved
@nyalldawson nyalldawson merged commit 8b18399 into qgis:master Sep 3, 2021
@github-actions
Copy link

github-actions bot commented Sep 3, 2021

@Gustry
A documentation ticket has been opened at qgis/QGIS-Documentation#6917
It is your responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change.
Thank you!

@Gustry Gustry deleted the post_filedownloader branch September 3, 2021 05:05
@zacharlie zacharlie added ChangelogHarvested This PR description has been harvested in the Changelog already. and removed Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Sep 26, 2021
false,
QStringLiteral( "GET" )
);
methodParam->setHelp( QObject::tr( "The HTTP method to use for the request" ) );
Copy link
Contributor

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

Copy link
Contributor Author

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 ?

Copy link
Contributor

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

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChangelogHarvested This PR description has been harvested in the Changelog already. Feature Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants