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

Lightweight HTTP(S) request algorithm performing post / get requests #58681

Merged
merged 3 commits into from
Sep 29, 2024

Conversation

signedav
Copy link
Contributor

@signedav signedav commented Sep 12, 2024

Considert inputs from here #58464 (comment)

Screenshot from 2024-09-13 13-03-32

Options

  • Optional data can be passed by POST Requests
  • An authentification configuration can be passed optionally
  • The reply data can be written optionally to a file for further use
  • Network errors can be considered as algorithm failure - otherwise it passes and returns the codes

Return values are:

  • STATUS_CODE: The HTTP Status
  • ERROR_CODE: When it fails (like as well on 404 HTTP Status etc.)
  • ERROR_MESSAGE: In case of failure - the error message
  • RESULT_DATA: In case of success - this is a string containing the data
  • OUTPUT: In case of success - The optional output file containing the data

Notes

  • This algorithm supports application/x-www-form-urlencoded requests. Additional feature could be the possibility to add binary data to perform multipart requests but not in this PR
  • There is an option to consider the algorithm as failed on error (means everything except error code 0). Additional feature could be the possibility to choose on what specific error code(s) or HTTP status code(s) it should fail

@github-actions github-actions bot added this to the 3.40.0 milestone Sep 12, 2024
Copy link

github-actions bot commented Sep 12, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 15a78dc)

@signedav signedav marked this pull request as ready for review September 12, 2024 14:53
src/analysis/processing/qgsalgorithmhttprequest.cpp Outdated Show resolved Hide resolved
src/analysis/processing/qgsalgorithmhttprequest.cpp Outdated Show resolved Hide resolved
src/analysis/processing/qgsalgorithmhttprequest.cpp Outdated Show resolved Hide resolved
src/analysis/processing/qgsalgorithmhttprequest.cpp Outdated Show resolved Hide resolved
src/analysis/processing/qgsalgorithmhttprequest.cpp Outdated Show resolved Hide resolved
src/analysis/processing/qgsalgorithmhttprequest.cpp Outdated Show resolved Hide resolved
src/analysis/processing/qgsalgorithmhttprequest.cpp Outdated Show resolved Hide resolved
src/analysis/processing/qgsalgorithmhttprequest.cpp Outdated Show resolved Hide resolved
src/analysis/processing/qgsalgorithmhttprequest.cpp Outdated Show resolved Hide resolved
src/analysis/processing/qgsalgorithmhttprequest.cpp Outdated Show resolved Hide resolved
@nyalldawson nyalldawson added the Freeze Exempt Feature Freeze exemption granted label Sep 13, 2024
@signedav signedav added the Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. label Sep 14, 2024
@qgis-bot
Copy link
Collaborator

@signedav
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!

@nyalldawson nyalldawson merged commit a05e55b into qgis:master Sep 29, 2024
28 checks passed
@qgis-bot
Copy link
Collaborator

@signedav
A documentation ticket has been opened at qgis/QGIS-Documentation#9282
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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Freeze Exempt Feature Freeze exemption granted Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants