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

Form submit actions with HTTP POST #46384

Merged
merged 15 commits into from Dec 7, 2021

Conversation

elpaso
Copy link
Contributor

@elpaso elpaso commented Dec 6, 2021

New form submit POST actions

This PR adds two new HTTP POST actions, similar to the existing Open action which uses an HTTP GET request.

The two actions differ in the way the forma data are encoded:

  1. application/x-www-form-urlencoded
  2. multipart/form-data

form_submit_action

In both cases, data are passed to the action in an URL encoded URL.

A new function url_encode(<map>) is provided to convert a dictionary (a map) to the encoded format.

immagine

The response from the submitted URL is opened by delegating to the operating system QDesktopServices::openUrl() after the payload has been stored in a temporary file.

Funded by: Kanton Solothurn

@github-actions github-actions bot added this to the 3.24.0 milestone Dec 6, 2021
src/core/qgsactionmanager.cpp Outdated Show resolved Hide resolved
src/core/qgsaction.cpp Outdated Show resolved Hide resolved
src/core/qgsaction.cpp Outdated Show resolved Hide resolved
src/core/qgsaction.cpp Outdated Show resolved Hide resolved
resources/function_help/json/url_encode Outdated Show resolved Hide resolved
@zacharlie zacharlie added the Changelog Items that are queued to appear in the visual changelog - remove after harvesting label Dec 7, 2021
@nyalldawson nyalldawson merged commit be56138 into qgis:master Dec 7, 2021
DelazJ added a commit to qgis/QGIS-Documentation that referenced this pull request Dec 12, 2021
@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 May 28, 2022
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 Forms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants