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

Enable arbitrary posting for fetchpost -> new command: fetchpostj #544

Closed
andrejohansson opened this issue Oct 12, 2022 · 6 comments · Fixed by #2268
Closed

Enable arbitrary posting for fetchpost -> new command: fetchpostj #544

andrejohansson opened this issue Oct 12, 2022 · 6 comments · Fixed by #2268
Assignees
Labels
enhancement New feature or request. Once marked with this label, its in the backlog. WIP work in progress

Comments

@andrejohansson
Copy link

andrejohansson commented Oct 12, 2022

Is your feature request related to a problem? Please describe.
When using fetchpost today the data is sent form encoded and with the header application/x-www-form-urlencoded. It would be nice if we could send arbitrary content headers and arbritrary content data instead.

For example, posing a json payload per csv row to the endpoint and setting content type header to application/json. I know I can set headers today but I cannot change the posted data format.

Describe the solution you'd like

  1. Add a parameter to let us define a payload template, for example in mustcache format (or handlebar or other template language)
  2. Expose all csv row columns as variables (eg. column country can be used in template as {{country}}
  3. For each csv row, render the template and post it
@jqnatividad jqnatividad added the enhancement New feature or request. Once marked with this label, its in the backlog. label Oct 12, 2022
@jqnatividad
Copy link
Collaborator

This is an interesting feature request @andrejohansson and can appreciate its utility.

I'll add it to the backlog.

@jqnatividad jqnatividad changed the title Enable arbritary posting for fetchpost Enable arbitrary posting for fetchpost Oct 13, 2022
@jqnatividad jqnatividad self-assigned this Oct 28, 2022
@jqnatividad
Copy link
Collaborator

This will be implemented as the new fetchpostj command.

@jqnatividad jqnatividad changed the title Enable arbitrary posting for fetchpost Enable arbitrary posting for fetchpost -> new command: fetchpostj Dec 2, 2022
@github-actions
Copy link

github-actions bot commented Feb 1, 2023

Stale issue message

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2023
@jqnatividad
Copy link
Collaborator

Reopening... still planned, just need time... bad github-actions bot!

@github-actions
Copy link

Stale issue message

@jqnatividad
Copy link
Collaborator

Just to close the loop on this one - there is no need for a new fetchpostj command.

fetchpost can now post just about any content-type, so long as the requisite MiniJinja template is created for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request. Once marked with this label, its in the backlog. WIP work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants