Skip to content

Add file and multipart request body support (#43, #84) - #168

Merged
devops-rob merged 2 commits into
mainfrom
feat/43-84-file-multipart-bodies
Jul 29, 2026
Merged

Add file and multipart request body support (#43, #84)#168
devops-rob merged 2 commits into
mainfrom
feat/43-84-file-multipart-bodies

Conversation

@devops-rob

Copy link
Copy Markdown
Owner

Summary

  • Add request_body_file and request_multipart across terracurl_request resources, data sources, actions, and ephemeral resources (including read/destroy/renew/close variants where applicable).
  • Introduce shared payload resolution (resolveRequestPayload) with file read, multipart builder, Content-Type handling, and per-operation mutual-exclusion validators.
  • Extend destroy templating to substitute {response.*} in multipart part value fields at delete time.
  • Add guide, examples, generated schema docs, and CHANGELOG entry for 2.10.0. Closes Feature Request: Specify Files For Request Body #43 and [Feature Request] Support for multipart/form-data Format #84.

Test plan

  • go test ./internal/provider/ (unit + acceptance)
  • Resource PUT with request_body_file
  • Resource POST with request_multipart (text + file part)
  • Data source read with request_body_file
  • Action multipart payload wiring
  • Ephemeral renew/close with snapshotted renew_request_body_file / close_request_body_file

Made with Cursor

Introduce request_body_file and request_multipart for resources, data sources, actions, and ephemeral resources so binary payloads and form uploads are read from disk at request time without storing bytes in state. Closes #43 and #84.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Apply gofmt alignment fixes and check the type assertion in the action multipart test.

Co-authored-by: Cursor <cursoragent@cursor.com>
@devops-rob
devops-rob merged commit 69d6289 into main Jul 29, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Specify Files For Request Body

1 participant