livy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Melchicédec NDUWAYO <ndumelchipaul2...@gmail.com>
Subject apache livy and ajax post requests: Method Not Allowed
Date Wed, 11 Jul 2018 12:27:06 GMT
Good morning everyone,

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

*OPTIONS http://localhost:8998/ <http://localhost:8998/> 405 (Method Not
Allowed)* and *Failed to load http://localhost:8998/
<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 <http://localhost:8084>'
is therefore not allowed access. The response had HTTP status code 405.*
Here is the jquery code to start a session:


   1. var settings = {
   2.   "async": true,
   3.   "crossDomain": true,
   4.   "url": "http://localhost:8999/sessions",
   5.   "method": "POST",
   6.   "headers": {
   7.     "Content-Type": "application/json",
   8.     "X-Requested-By": "user",
   9.     "Cache-Control": "no-cache",
   10.   },
   11.   "processData": false,
   12.   "data": "{\"kind\": \"spark\"}"
   13. }
   14.
   15. $.ajax(settings).done(function (response) {
   16.   console.log(response);
   17. });


Thank you for your help

-- 
Cordialement
NDUWAYO Melchicédec
Université Clermont Auvergne(UCA)

Mime
View raw message