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

Input from PUT requests sent as multipart/form-data to Laravel backend is unavailable #250

Closed
1 task done
urbsny opened this issue Jun 23, 2021 · 1 comment · Fixed by #257
Closed
1 task done
Labels
bug Something isn't working try_it_out Issues relating to the Try It Out functionality

Comments

@urbsny
Copy link
Contributor

urbsny commented Jun 23, 2021

What happened?

  1. I'm using Laravel for the api backend.
  2. I sent PUT request as multipart/form-data.
  3. In the backend, the requested data will be empty.

My environment:

  • PHP version (from php -v): 8.0.3
  • Framework (Laravel/Lumen): Laravel
  • Laravel/Lumen version (from composer show laravel/framework or composer show laravel/lumen-framework): v8.47.0
  • Scribe version (from composer show knuckleswtf/scribe): 3.0.3

My Scribe config (minus the comments):

Additional info:
This problem is related to laravel/framework#13457 .
The solution is to change the HTTP request from PUT to POST and set PUT as the "_method" attribute.
I can solve this problem with fixing tryitout.js.
But I'm not sure if it will work well with using Lumen.

I'm sorry for my poor English.

@urbsny urbsny added the bug Something isn't working label Jun 23, 2021
@shalvah
Copy link
Contributor

shalvah commented Jun 30, 2021

Right. I see you've made a commit for this. Do you want to send in a PR?

@shalvah shalvah added the try_it_out Issues relating to the Try It Out functionality label Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working try_it_out Issues relating to the Try It Out functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants