fix: POST body in wasm+proxy:// urls in http processors and ftd.submit_form enhancements.#2140
Merged
siddhantk232 merged 11 commits intomainfrom Jun 10, 2025
Merged
fix: POST body in wasm+proxy:// urls in http processors and ftd.submit_form enhancements.#2140siddhantk232 merged 11 commits intomainfrom
wasm+proxy:// urls in http processors and ftd.submit_form enhancements.#2140siddhantk232 merged 11 commits intomainfrom
Conversation
- process headers in a single place. - use to_serde_value - convert response to serde_json directly instead of first converting it to utf 8 string.
siddhantk232
reviewed
Jun 9, 2025
In an ftd function body, you can use the tuple variant of
`ftd.submit_form` method. This does not require you to have a
`ftd.string-field` instance.
```ftd
ftd.submit_form(
action_url,
("concept-url", concept_url),
("status", status, error)
)
```
The third element of the tuple is a mutable variable defined as:
```ftd
-- optional string $status-error:
```
Note that the use of `optional` is necessary as using just the `string`
type would issue warning and will not get updated from js.
- cargo update - version bump in fastn/Cargo.toml - Update changelog
siddhantk232
approved these changes
Jun 10, 2025
wasm+proxy:// urls in http processors and ftd.submit_form enhancements.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a
wasm+proxy://url is used in anhttpprocessor, the POST request body were not sent. This is fixed in this PR. Support for tuple style POST body params is also added toftd.submit_form, this works similar to theftd.httpfunction:The third element of the tuple is an optional mutable variable defined as:
Note that the use of
optionalis necessary as using just thestringtype would issue warning and will not get updated from js.
ftd.submit_formsupport tuple style args for POST body params.The associated ft_sdk PR is not necessary to work with changes in this PR. It can be merged later.