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

Fix demo panel for FormData request type #625

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

jk8
Copy link
Contributor

@jk8 jk8 commented Sep 18, 2023

Description

See #618

The current implementation doesn't support the FormData request well - at least sending binary files doesn't work at all.

There are 2 main problems:

  1. The request body is initially serialized to JSON
  2. The request Content-Type header is set manually instead of letting fetch to set it automatically based on the content. fetch should also set the correct boundary separator (eg multipart/form-data; boundary=---...).

Motivation and Context

See #618

How Has This Been Tested?

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

@welcome-to-palo-alto-networks

🎉 Thanks for opening this pull request! We really appreciate contributors like you! 🙌

@jk8 jk8 temporarily deployed to default September 18, 2023 10:57 — with GitHub Actions Inactive
@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 3f26fbe):

https://docusaurus-openapi-36b86--pr625-2hyyika4.web.app

(expires Thu, 19 Oct 2023 19:20:43 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@sserrata
Copy link
Member

Hi @jk8, the changes look good to me. Is there any more testing to be done before this PR can be merged?

@sserrata sserrata added this to the v2.0 UI/UX Refresh milestone Sep 29, 2023
Copy link
Member

@sserrata sserrata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏽

@sserrata sserrata merged commit 2618071 into PaloAltoNetworks:v2.0.0 Sep 29, 2023
11 checks passed
@welcome-to-palo-alto-networks

🎉 Congrats on getting your first pull request merged! We here at Palo Alto Networks are so grateful! ❤️

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.

2 participants