Moodle
  1. Moodle
  2. MDL-29913

REST server should also return JSONP objects

    Details

      Description

      We should add some JSONP support to the REST server. It would be useful to do cross-platform call in javascript.

        Gliffy Diagrams

          Issue Links

            Activity

            Jérôme Mouneyrac created issue -
            Jérôme Mouneyrac made changes -
            Field Original Value New Value
            Fix Version/s DEV backlog [ 10464 ]
            Priority Minor [ 4 ] Major [ 3 ]
            Jérôme Mouneyrac made changes -
            Hide
            Juan Leyva added a comment -

            I think this is a required feature for developing HTML5 webservice clients

            For the readers: Please note that this is not required if you package your app with Phonegap or other frameworks.

            See: http://wiki.phonegap.com/w/page/16494770/FAQ (AJAX question)..

            Q. I want to create an application for phonegap to access externally deployed web services via AJAX. How can i resolve the issue with the
            cross-domain security policy of XmlHttpRequest?
            A. The cross-domain security policy does not affect PhoneGap applications. Since the html files are called by webkit with the file:// protocol, the security policy does not apply.
            (in Android,you may grant android.permission.INTERNET to your app by edit the AndroidManifest.xml)

            Show
            Juan Leyva added a comment - I think this is a required feature for developing HTML5 webservice clients For the readers: Please note that this is not required if you package your app with Phonegap or other frameworks. See: http://wiki.phonegap.com/w/page/16494770/FAQ (AJAX question).. Q. I want to create an application for phonegap to access externally deployed web services via AJAX. How can i resolve the issue with the cross-domain security policy of XmlHttpRequest? A. The cross-domain security policy does not affect PhoneGap applications. Since the html files are called by webkit with the file:// protocol, the security policy does not apply. (in Android,you may grant android.permission.INTERNET to your app by edit the AndroidManifest.xml)
            Jérôme Mouneyrac made changes -
            Labels patch
            Hide
            Jérôme Mouneyrac added a comment - - edited

            The github submission I attached was created for testing a Moodle HTML5 ws client prototype. It could need a bit of polishing, but it should not be far from final version.

            Show
            Jérôme Mouneyrac added a comment - - edited The github submission I attached was created for testing a Moodle HTML5 ws client prototype. It could need a bit of polishing, but it should not be far from final version.
            Hide
            Nathan Mares added a comment -

            I have to agree, this would be a useful addition to Moodle's web services.

            Jerome - github submissions looks good but shouldn't the Content-Type be "application/javascript" for the jsonp content type?

            Show
            Nathan Mares added a comment - I have to agree, this would be a useful addition to Moodle's web services. Jerome - github submissions looks good but shouldn't the Content-Type be "application/javascript" for the jsonp content type?
            Hide
            Jérôme Mouneyrac added a comment -

            Hi Nathan, I don't know, I didn't ask myself this question as token.php already return json and it worked like that. But it's a good remark.

            Show
            Jérôme Mouneyrac added a comment - Hi Nathan, I don't know, I didn't ask myself this question as token.php already return json and it worked like that. But it's a good remark.
            Jérôme Mouneyrac made changes -
            Assignee Jerome Mouneyrac [ jerome ] No Body [ deneme ]
            Michael de Raadt made changes -
            Labels patch patch triaged
            Jérôme Mouneyrac made changes -
            Assignee No Body [ deneme ] Jerome Mouneyrac [ jerome ]
            Jérôme Mouneyrac made changes -
            Priority Major [ 3 ] Minor [ 4 ]
            Jérôme Mouneyrac made changes -
            Affects Version/s Future Dev [ 12153 ]
            Jérôme Mouneyrac made changes -
            Labels patch triaged dev_docs_required patch triaged
            Hide
            Jérôme Mouneyrac added a comment -

            I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue.
            For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

            Show
            Jérôme Mouneyrac added a comment - I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment
            Jérôme Mouneyrac made changes -
            Assignee Jérôme Mouneyrac [ jerome ]
            Juan Leyva made changes -
            Link This issue will be (partly) resolved by MDL-47545 [ MDL-47545 ]

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: