473,811 Members | 2,565 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9448


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.as p>
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
2717
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 with window tried without Please help. This code pulls XML from a web site then parses it into a dynamically created table built with javascript. The write table is not working correctly, other methods work fine. This code also locks up Fire Fox...
10
14100
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. So I'm wondering if I'm missing something? My test code is as follows: function myObj() { var req = new Object(); req.temp = 0;
12
3463
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 properly. It works, for example, when invoking functions (alert('hello')), but not for defining functions. The case occurs when retrieving the javascript code with
7
1893
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 happening with this script ----------------------------------------------------- xmlhttp = new XMLHttpRequest();
5
2412
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 HTTP Request object." In my haze of testing yesterday it seems that NN6.1 provides an non-functional XMLHttpRequest object and NN6.2 XMLHttpRequest object
1
4036
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 technology is implemented on more sites now than ever. Compatibility is no longer an issue (IE, Mozilla and Opera all support it), and the benefits to using it are amazing. There are too many PHP programmers avoiding any
1
5306
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? Here's my code: The function mySaveFunction() is called by clicking the "Update" button, after the user changes the data which is populated in the form fields, which was retrieved via XMLHttpRequest from an XML external file. I know that...
6
2308
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 causing trouble. It chokes on this: if (window.XMLHttpRequest) nameReq = new XMLHttpRequest(); else if (window.ActiveXObject) nameReq = new ActiveXObject("Microsoft.XMLHTTP");
0
9730
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10651
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10136
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9208
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7671
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5693
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4341
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3868
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3020
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.