mozilla / popcorn-js

The HTML5 Media Framework. (Unmaintained. See https://github.com/menismu/popcorn-js for activity)
MIT License
2.14k stars 631 forks source link

XHR Post #288

Closed scottgarner closed 11 years ago

scottgarner commented 11 years ago

Popcorn doesn't set the content-type to "application/x-www-form-urlencoded" before sending POST data with Popcorn.xhr. Is there a reason for this? I can't seem to handle the request server-side (at least with PHP) without setting it.

Thanks!

rwaldron commented 11 years ago

Popcorn.xhr shouldn't be used for anything but Popcorn plugin authoring, to request remote resources. This will not change. If you need a fully featured XHR API: http://api.jquery.com/jQuery.ajax

scottgarner commented 11 years ago

Thanks for the response, Rick.

I'm writing a Popcorn plugin to show time-based comments on a video, currently with Wordpress's comment system as a backend (though all of the Popcorn code is abstracted from Wordpress). In this case, the resource I need only accepts POST requests and fails without the appropriate content type. I chose not to use jQuery per the instruction to eliminate all dependencies when developing a Popcorn plugin.

rwaldron commented 11 years ago

Ok, we'll need to take this to the actual Popcorn bug tracker: https://webmademovies.lighthouseapp.com/projects/63272-popcornjs/overview

No guarantees, but can you file there? Thanks

scottgarner commented 11 years ago

Sorry, should have posted there in the first place. Thanks!