473,396 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

XMLHTTPRequest with PUT, DELETE, etc.

Hi,

is it possible to use the XMLHTTPRequest-Object with the Methods PUT
and DELETE in JavaScript? Maybe there is a tutorial or a short e.g.

thx for answer
Rufnex

Dec 2 '05 #1
5 9410


Rufnex wrote:
is it possible to use the XMLHTTPRequest-Object with the Methods PUT
and DELETE in JavaScript? Maybe there is a tutorial or a short e.g.


It might depend on the implementation or version of that object you are
using but in theory more than the regularly used POST and GET requests
are possible, just use the HTTP method as the first argument to the open
method.
For MSXML (which you use with client-side script in IE for instance) it
is documented
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/52aaf5ff-e302-4490-821a-cb3a085fe5ee.asp>
that the method parameter of the open method allows
"The HTTP method used to open the connection, such as GET, POST, PUT,
or PROPFIND"
although I don't read that as a complete list, HEAD for instance is
certainly possible too in my experience.

Mozilla's XMLHttpRequest should also have a broad support for the
various HTTP request methods.

I think other browsers like Safari first focussed on implementing the
mainly used methods GET and POST but probably have improved by now but
of course on the web you might then be prepared to have visitors with
older versions.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Dec 2 '05 #2
thx for your answer . .i tried to use this methods but i got always an
error 405 (not allowed). does anyone used PUT oder DELETE sucessfull?

Dec 2 '05 #3

Rufnex wrote:
i tried to use this methods but i got always an
error 405 (not allowed). does anyone used PUT oder DELETE sucessfull?


If the server gives you a HTTP response status code of 405 then the
problem is very likely not with the client-side script but simply that
the server does not allow those requests you have made on the URLs you
have tried. A public HTTP server on the internet will rather not allow
PUT requests by anyone for any URL, that way anyone could change stuff
on the server.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Dec 2 '05 #4
VK

Rufnex wrote:
is it possible to use the XMLHTTPRequest-Object with the Methods PUT
and DELETE in JavaScript? Maybe there is a tutorial or a short e.g.


AFAIK:

The only browsers ever implemented PUT method are:

1. NCSA Mosaic
2. W3C Amaya

Besides these two there was (not a browser but still Web related)
Netscape Composer from Netscape 4.x package

Thus you can set your server to accept any existing and not-existing
requests (PUT, FOOBAR etc.) , but browser has no means to generate such
request or to accept such response.

Dec 2 '05 #5
On 2005-12-02, Rufnex <in**@jg-webdesign.de> wrote:
thx for your answer . .i tried to use this methods but i got always an
error 405 (not allowed). does anyone used PUT oder DELETE sucessfull?


Those error messages come from the http server, it may need reconfiguring.
check its access and error logs.

Bye.
Jasen
Dec 4 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Adam | last post by:
This is frustrating me. Opening IE displays the following code fine. When I open a new window the code no longer works. All the HTML is overwritten with the first document.write statement. Tried...
10
by: Matt Kruse | last post by:
I'm aware of the circular reference memory leak problem with IE/closures. I'm not sure exactly how to resolve it in this situation. Also, Firefox appears to grow its memory size with the same code....
12
by: knocte | last post by:
Hello. I have always thought that the eval() function was very flexible and useful. If I use it, I can define functions at runtime!! However, I have found a case where eval() does not work...
7
by: SE | last post by:
Hi all, Apologies if this has been done before. I am trying to do some stuff with XMLHttpRequest in mozilla but no dice. I have finally pared everything down to the minimum to see what is...
5
by: Peter Michaux | last post by:
Hi, The FAQ correctly says the following: "Mozilla (NN6.2+, Firefox, Ice Weasle etc), Opera 7.6+, Safari1.2+, the Windows version of IE versions 5+, and some other browsers provide the XML...
1
by: geevaa | last post by:
http://www.phpbuilder.com/columns/kassemi20050606.php3 XMLHttpRequest and AJAX for PHP programmers James Kassemi Introduction: Although the concept isn't entirely new, XMLHttpRequest...
1
by: Tarik Monem | last post by:
OK, I'm pretty sure this cannot work because I'm trying to use JavaScript (client-side) to write to an xml file (which is server-side) using XMLHttpRequest. Can I use PHP do what I'm trying to do?...
6
by: Patrick Nolan | last post by:
I'm working on cross-platform portability of some javascript. My Macintosh testing platform is rather old. It has Safari 1.3.2 and Internet Explorer 5.2. I got Safari working, but now IE is...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.