Hi,
I would like to send DELETE request to google calendar but nothing of
this works:
xmlhttp.open("POST",del,false);
xmlhttp.setRequestHeader("X-HTTP-Method-Override", "DELETE");
xmlhttp.send();
or
xmlhttp.open("DELETE",del,false);
xmlhttp.send();
MSE debugger displays error: Access denied to both of the solutions..
is there any way how to solve it?
Thanks
|
|
0
|
|
|
|
Reply
|
oldrich.svec81 (2)
|
2/11/2008 1:36:20 PM |
|
On Feb 11, 1:36 pm, czechboy <oldrich.s...@gmail.com> wrote:
> Hi,
> I would like to send DELETE request to google calendar but nothing of
> this works:
> xmlhttp.open("POST",del,false);
> xmlhttp.setRequestHeader("X-HTTP-Method-Override", "DELETE");
> xmlhttp.send();
> or
> xmlhttp.open("DELETE",del,false);
> xmlhttp.send();
>
> MSE debugger displays error: Access denied to both of the solutions..
> is there any way how to solve it?
> Thanks
What are you trying to "DELETE"?
Read a bit more about "xmlhttp" ansd then ...
read a little bit more still...
|
|
0
|
|
|
|
Reply
|
GArlington
|
2/11/2008 2:13:19 PM
|
|
I am try
On 11 =DAn, 15:13, GArlington <garling...@tiscali.co.uk> wrote:
> On Feb 11, 1:36 pm, czechboy <oldrich.s...@gmail.com> wrote:
>
> > Hi,
> > I would like to send DELETE request to google calendar but nothing of
> > this works:
> > xmlhttp.open("POST",del,false);
> > xmlhttp.setRequestHeader("X-HTTP-Method-Override", "DELETE");
> > xmlhttp.send();
> > or
> > xmlhttp.open("DELETE",del,false);
> > xmlhttp.send();
>
> > MSE debugger displays error: Access denied to both of the solutions..
> > is there any way how to solve it?
> > Thanks
>
> What are you trying to "DELETE"?
> Read a bit more about "xmlhttp" ansd then ...
> read a little bit more still...
I am trying to delete Calendar Event (see
http://code.google.com/apis/calendar/developers_guide_protocol.html#Deleting=
Events
).
|
|
0
|
|
|
|
Reply
|
czechboy
|
2/11/2008 2:22:49 PM
|
|
czechboy schreef:
> I am trying to delete Calendar Event (see
> http://code.google.com/apis/calendar/developers_guide_protocol.html#DeletingEvents
> ).
It appears that you need to send the XML describing the item you want to
delete along with the DELETE request method.
JW
|
|
0
|
|
|
|
Reply
|
Janwillem
|
2/11/2008 2:58:02 PM
|
|
On 11 =DAn, 15:58, Janwillem Borleffs <j...@jwscripts.com> wrote:
> czechboy schreef:
>
> > I am trying to delete Calendar Event (see
> >http://code.google.com/apis/calendar/developers_guide_protocol.html#D...
> > ).
>
> It appears that you need to send the XML describing the item you want to
> delete along with the DELETE request method.
>
> JW
I do not think so. It is already described in the url of the reguest.
But generaly. Is it allowed to send DELETE request via WSH jscript new
ActiveXObject("Microsoft.XMLHTTP"); ? Here http://safari.oreilly.com/9780596=
529260/faking-put
I can read that:
"Not all clients support HTTP PUT and DELETE. The action of an XHTML 4
form can only be GET or POST, and this has made a lot of people think
that PUT and DELETE aren't real HTTP methods. Some firewalls block
HTTP PUT and DELETE but not POST. If the server supports it, a client
can get around these limitations by tunneling PUT and DELETE requests
through overloaded POST. There's no reason these techniques can't work
with other HTTP actions like HEAD, but PUT and DELETE are the most
common.
I recommend a tunneling technique pioneered by today's most RESTful
web frameworks: include the "real" HTTP method in the query string.
Ruby on Rails defines a hidden form field called _method which
references the "real" HTTP method. If a client wants to delete the
resource at /my/resource but can't make an HTTP DELETE request, it can
make a POST request to /my/resource?_method=3Ddelete, or include
_method=3Ddelete in the entity-body. Restlet uses the method variable
for the same purpose.
The second way is to include the "real" HTTP action in the X-HTTP-
Method-Override HTTP request header. Google's GData API recognizes
this header. I recommend appending to the query string instead. A
client that doesn't support PUT and DELETE is also likely to not
support custom HTTP request headers."
I have also tried to send ordinary POST request and as paramater to
use "_method=3Ddelete" but it did not work either...
|
|
0
|
|
|
|
Reply
|
czechboy
|
2/11/2008 3:17:31 PM
|
|
czechboy schreef:
> I do not think so. It is already described in the url of the reguest.
> But generaly. Is it allowed to send DELETE request via WSH jscript new
> ActiveXObject("Microsoft.XMLHTTP"); ? Here http://safari.oreilly.com/9780596529260/faking-put
> I can read that:
>
[...]
What happens when you try doing this through a manual telnet session?
telnet google_host port_no
DELETE /path HTTP/1.0
[enter]
[enter]
JW
|
|
0
|
|
|
|
Reply
|
Janwillem
|
2/11/2008 3:25:55 PM
|
|
On Feb 11, 2:22 pm, czechboy <oldrich.s...@gmail.com> wrote:
> I am try
>
> On 11 =DAn, 15:13, GArlington <garling...@tiscali.co.uk> wrote:
>
>
>
> > On Feb 11, 1:36 pm, czechboy <oldrich.s...@gmail.com> wrote:
>
> > > Hi,
> > > I would like to send DELETE request to google calendar but nothing of
> > > this works:
> > > xmlhttp.open("POST",del,false);
> > > xmlhttp.setRequestHeader("X-HTTP-Method-Override", "DELETE");
> > > xmlhttp.send();
> > > or
> > > xmlhttp.open("DELETE",del,false);
> > > xmlhttp.send();
>
> > > MSE debugger displays error: Access denied to both of the solutions..
> > > is there any way how to solve it?
> > > Thanks
>
> > What are you trying to "DELETE"?
> > Read a bit more about "xmlhttp" ansd then ...
> > read a little bit more still...
>
> I am trying to delete Calendar Event (seehttp://code.google.com/apis/calen=
dar/developers_guide_protocol.html#D...
> ).
OK, it looks like you are right in using http DELETE method to delete
calendar events (this is what I understood from reading their docs).
The problem is that either xmlhttp considers it "unsafe" or the server
does not receive your authenticated user info and decides that you are
NOT authorised to delete the event.
|
|
0
|
|
|
|
Reply
|
GArlington
|
2/12/2008 4:48:35 PM
|
|
czechboy wrote:
> [<http://safari.oreilly.com/9780596529260/faking-put>:]
> "Not all clients support HTTP PUT and DELETE. The action of an XHTML 4
> form can only be GET or POST, [...]
There is no XHTML 4 yet.
PointedEars
|
|
0
|
|
|
|
Reply
|
Thomas
|
2/14/2008 6:10:18 PM
|
|
czechboy wrote:
> But generaly. Is it allowed to send DELETE request via WSH jscript new
> ActiveXObject("Microsoft.XMLHTTP"); ? Herehttp://safari.oreilly.com/9
> 780596529260/faking-put
> I can read that:
>
> "Not all clients support HTTP PUT and DELETE. The action of an XHTML 4
> form can only be GET or POST, and this has made a lot of people think
> that PUT and DELETE aren't real HTTP methods. Some firewalls block
> HTTP PUT and DELETE but not POST. If the server supports it, a client
> can get around these limitations by tunneling PUT and DELETE requests
> through overloaded POST. There's no reason these techniques can't work
> with other HTTP actions like HEAD, but PUT and DELETE are the most
> common.
>
> I recommend a tunneling technique pioneered by today's most RESTful
> web frameworks: include the "real" HTTP method in the query string.
> Ruby on Rails defines a hidden form field called _method which
> references the "real" HTTP method. If a client wants to delete the
> resource at /my/resource but can't make an HTTP DELETE request, it can
> make a POST request to /my/resource?_method=delete, or include
> _method=delete in the entity-body. Restlet uses the method variable
> for the same purpose.
>
> The second way is to include the "real" HTTP action in the X-HTTP-
> Method-Override HTTP request header. Google's GData API recognizes
> this header. I recommend appending to the query string instead. A
> client that doesn't support PUT and DELETE is also likely to not
> support custom HTTP request headers."
I think this quote is not relevant. XMLHttpRequest doesn't care about
(X)HTML versions. The only requirement here is that it supports the
DELETE method, which it does.
From http://www.w3.org/TR/XMLHttpRequest/
| *should* support any HTTP method that matches the Method
| production and *must* at least support the following methods:
| GET
| POST
| HEAD
| PUT
| DELETE
| OPTIONS
From http://msdn2.microsoft.com/en-us/library/ms536648(VS.85).aspx
| DELETE [...] Delete data for URI
Once that is known, the next step is to verify whether the DELETE-
method is accepted at the remote machine. This should be okay; why
else would Google Calendar write an application/docs for it. To make
sure, you could use the test of Janwillem Borleffs earlier in this
thread. This test would also reveal whether DELETE-requests could
maybe be blocked somewhere between client and server (?), because
DELETE over HTTP is rarely used. But I would also councel to reread
the docs to make sure your code is correct.
I agree with the author of the article to avoid 'X-HTTP-Method-
Override'.
Hope this helps,
--
Bart
|
|
0
|
|
|
|
Reply
|
Bart
|
2/15/2008 1:31:17 PM
|
|
Bart Van der Donck wrote:
> czechboy wrote:
>> [<http://safari.oreilly.com/9780596529260/faking-put>]
>
> I think this quote is not relevant. XMLHttpRequest doesn't care about
> (X)HTML versions. The only requirement here is that it supports the
> DELETE method, which it does.
>
> From http://www.w3.org/TR/XMLHttpRequest/
>
> | *should* support any HTTP method that matches the Method
> | production and *must* at least support the following methods:
> | GET
> | POST
> | HEAD
> | PUT
> | DELETE
> | OPTIONS
That's irrelevant either. You are quoting from a *working draft*.
> From http://msdn2.microsoft.com/en-us/library/ms536648(VS.85).aspx
>
> | DELETE [...] Delete data for URI
Relevant, but only to MSXML.
PointedEars
|
|
0
|
|
|
|
Reply
|
Thomas
|
2/17/2008 11:18:07 AM
|
|
|
9 Replies
366 Views
(page loaded in 0.863 seconds)
Similiar Articles: "Microsoft.XMLHTTP = delete request? - comp.lang.javascript ...Hi, I would like to send DELETE request to google calendar but nothing of this works: xmlhttp.open("POST",del,false); xmlhttp.setRequestHeader... HTTP client to post XML RAW_DATA to restful API - comp.lang.ruby ..."Microsoft.XMLHTTP = delete request? - comp.lang.javascript ..... Event (see > http://code.google.com/apis ... that: "Not all clients support HTTP ... firewalls block ... Handling ActiveX events in JavaScript (Internet Explorer) - comp ..."Microsoft.XMLHTTP = delete request? - comp.lang.javascript ..... schreef: > I am trying to delete Calendar Event (see ... About Native XMLHTTP (Internet Explorer ... How to similate HTTP POST request by JavaScript? - comp.lang ...I have also tried to send ordinary POST request and as paramater to use ... How to similate HTTP POST request by JavaScript? - comp.lang ... "Microsoft.XMLHTTP = delete ... XML validation with parseFromString on Safari - comp.lang ..."Microsoft.XMLHTTP = delete request? - comp.lang.javascript ... XML validation with parseFromString on Safari - comp.lang ... It appears that you need to send the XML ... Insert,view,update and delete using javascript and xml - comp.lang ...Safari and javascript - comp.lang.javascript "Microsoft.XMLHTTP = delete request? - comp.lang.javascript ... XML validation ... How to Freeze Columns Using Javascript and ... POST request to SSL/HTTPS URL - comp.lang.java.programmer ..."Microsoft.XMLHTTP = delete request? - comp.lang.javascript ... It is already described in the url of the reguest. But generaly. Is ... wants to delete the resource at /my ... Safari and javascript - comp.lang.javascript"Microsoft.XMLHTTP = delete request? - comp.lang.javascript ... XML validation with parseFromString on Safari - comp.lang ... It appears that you need to send the XML ... "Microsoft.XMLHTTP = delete request? - Application Forum at ...Hi, I would like to send DELETE request to google calendar but nothing of this works: xmlhttp.open("POST",del,false); xmlhttp.setRequestHeade "Microsoft.XMLHTTP = delete request? - comp.lang.javascript ...Hi, I would like to send DELETE request to google calendar but nothing of this works: xmlhttp.open("POST",del,false); xmlhttp.setRequestHeader... 7/23/2012 3:02:44 PM
|