Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6542173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:11:38+00:00 2026-05-25T11:11:38+00:00

I make a request with Ajax and the request works fine when I use

  • 0

I make a request with Ajax and the request works fine when I use GET. It doesn’t if I use POST in my script and my Rest-Service.

$.ajax({
    type: 'POST',
    url: 'http://localhost/WebRestService/rest/User/deletePC',
    dataType: "text",
    success: function(antwort){
        alert("response:"+antwort);
        if (window.DOMParser)
        {
            parser=new DOMParser();
            xmlDoc=parser.parseFromString(antwort,"text/xml");
        }
        else // Internet Explorer
        {
            xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
            xmlDoc.async="false";
            xmlDoc.loadXML(antwort);
        } 
    },
    error:function(x,e){
        if(x.status==0){
            alert('You are offline!!\n Please Check Your Network.');
        }else if(x.status==404){
            alert('Requested URL not found.');
        }else if(x.status==500){
            alert('Internel Server Error.');
        }else if(e=='parsererror'){
            alert('Error.\nParsing JSON Request failed.');
        }else if(e=='timeout'){
            alert('Request Time out.');
        }else {
            alert('Unknow Error.\n'+x.responseText);
        }
    }
});

If I use POST I get an unknown error. What is the problem?

THX!

Edit: DELETE and PUt also doesn’t work.
Edit2: if I use firefox Poster it works fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:11:38+00:00Added an answer on May 25, 2026 at 11:11 am

    My where is you data that you are sending in your ajax request?
    When you send post request you have to identify your data that you are sending.
    You are missing data attribute of post request.

    $.ajax({
    
     type: 'POST',
        url: 'http://localhost/WebRestService/rest/User/deletePC',
        data:'some data',
       dataType: "text",
      success: function(antwort){
        alert("response:"+antwort);
        },
    });
    

    For further reading consult here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I make an AJAX request like so using JQuery: $.ajax({ type: GET, url: getvideo.php,
I use this pseudo-class to make Ajax request to server: function RequestManager(url, params, success,
I make an AJAX GET request to a PHP script to compare a value
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js type=text/javascript></script> <script> $.get(http://example.com/, function(data) { alert(data); }); </script> it does an OPTIONS
I'm using a jquery to make an $.ajax request. It works fine in chrome/firefox
I need to make an AJAX request from a website to a REST web
I'm working at an app which would make a POST ajax request to a
I'm trying to make a post request via ajax using jQuery (for the BaseCamp
I am making an ajax request using Jquery and everything works fine except the
I'm using jQuery 1.6.2 to make a POST AJAX request to a page on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.