cancel
Showing results for 
Search instead for 
Did you mean: 

http://127.0.0.1:8080/activiti-rest/service/login Error(version 5.13)

frankpeng
Champ in-the-making
Champ in-the-making
In my login.html file, I want to post a request to  'http://127.0.0.1:8080/activiti-rest/service/login' through jquery ajax to login, but the return message is:
{"readyState":4,"responseJSON":{"code":405,"msg":"The method specified in the request is not allowed for the resource identified by the request URI"},"status":200,"statusText":"load"}

Please help me.


the following is my codes:
  $.ajax({
      type: 'post',
      url: '127.0.0.1:8080/activiti-rest/service/login',
      dataType: 'jsonp',
      data: {'userId':'kermit','password':'kermit'},
      contentType: 'application/json',
      cache: false,
      complete: function(xhr,ts) {
          $('body').append(JSON.stringify(xhr));
      },
      success: function(xhr,ts) {
          alert(JSON.stringify(xhr));
      }
    });
7 REPLIES 7

jbarrez
Star Contributor
Star Contributor
You sure that you are sending a POST? When I try with RESTclient it works

frankpeng
Champ in-the-making
Champ in-the-making
yes,  sure that I am sending a POST

trademak
Star Contributor
Star Contributor
Did you try to invoke the login service from RESTClient or another test tool?

frankpeng
Champ in-the-making
Champ in-the-making
The above codes is in the web page "http://127.0.0.1/activiti/login.html", but activiti-rest website is "http://127.0.0.1:8080/activiti-rest/" .
Would you tell me where or not support cross-website visit.

frederikherema1
Star Contributor
Star Contributor
We don't have anything into place by default for cross-origin URL's. you should either add a proxy in front (apache) or sort out the config for CORS…

mahawas
Champ in-the-making
Champ in-the-making
How to config the activiti-rest for CORS ?

jbarrez
Star Contributor
Star Contributor
CORS is done on the server level. Eg for tomcat: http://enable-cors.org/server_tomcat.html
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.