Uploaded image for project: 'Livy'
  1. Livy
  2. LIVY-482

apache livy and ajax post requests: Method Not Allowed

    XMLWordPrintableJSON

    Details

    • Type: Request
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.5.0
    • Fix Version/s: None
    • Component/s: Interpreter
    • Labels:
      None

      Description

      Good morning everyone,

      can someone help me to see why this jquery code can note create a session to the apache livy? I got these errors :

      OPTIONS http://localhost:8998/ 405 (Method Not Allowed) and *Failed to load http://localhost:8998/: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8084' is therefore not allowed access. The response had HTTP status code 405.
      *
      This is the code I used :

      $.ajax({
                  type: 'POST',
                  contentType: "application/json; charset=utf-8",
                  dataType: 'json',
                  url: 'http://localhost:8998',
                  data: {kind: 'spark'},
                  success: function (resultat) {
                      document.getElementById(response).innerHTML = resultat;
                      console.log(resultat);
      
                  }
      
              });
      

      Thank you for your help!

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Melchi Melchic├ędec NDUWAYO
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: