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

Cannot send request when using pre-request script and multipart form #3112

Open
2 tasks done
BorisGerretzen opened this issue Sep 17, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@BorisGerretzen
Copy link

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

When I send my request with a multipart form body I have no issues, but when I send it with a pre-request script I get an error Error invoking remote method 'send-http-request': Error: TypeError: Cannot read properties of undefined (reading 'value').
When I change the body type to any other type or I remove the pre-request script everything works fine.

.bru file to reproduce the bug

meta {
  name: Example
  type: http
  seq: 5
}

post {
  url: https://localhost
  body: multipartForm
  auth: none
}

script:pre-request {
  const example = 0;
}

Screenshots/Live demo link

Multipart form + script (doesnt work):
image

JSON + script (works, connection refused is expected):
image

Multipart form without script (works, connection refused is expected):
image

@BorisGerretzen BorisGerretzen added the bug Something isn't working label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant