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

Feature/add raw file request body option #2755

Open
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

zachary-berdell-elliott
Copy link
Contributor

@zachary-berdell-elliott zachary-berdell-elliott commented Aug 5, 2024

Description

This PR adds the ability for a user to set a raw file as the request body. A user is able to select the option raw file and send a request this way. Raw file is stored as a string of the file path and fs library is used to get the file from the path then set it to the file.
Screenshot 2024-08-04 134812
Screenshot 2024-08-04 154344
Screenshot 2024-08-04 154330
Screenshot 2024-08-04 154413

Not added with this:

  • Raw files in other collection types will still be imported with no body instead of the raw file request body
  • Content-Type still needs to be manually set by the user. Functionality to set it based on the file extension has not been introduced.

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

@zachary-berdell-elliott
Copy link
Contributor Author

This PR addresses #2700

@sanjai0py
Copy link
Member

Hey @zachary-berdell-elliott, thank you for taking the time to implement this feature! Since the PR is quite extensive, we need some time to review and test it.

@zachary-berdell-elliott
Copy link
Contributor Author

Hi @sanjai0py, thanks for taking the time to review this PR. It's good to have a second set of eyes on it. Let me know if you observe any issues with it. I'm willing to make corrections.

@zachary-berdell-elliott
Copy link
Contributor Author

Hi @sanjai0py, Just committed all your suggestions. Good catches there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants