login about faq

If I want to submit a custom HTTP request (DELETE), what's the proper/best way? I tried doing a PostUrlEncoded() after creating a HttpRequest object with the HttpVerb set to "DELETE", but didn't have any luck as the Http class still uses POST as the verb despite me setting the custom verb. Using Http.SynchronousRequest seems like the next best bet but I only see how to make domain-level queries; I tried inputting a full path (site.com/a/b/c) and it merged it all into site.comabc, stripping the slashes. So how can I make a HTTP DELETE request?

asked Sep 18 '14 at 08:22

chilkat's gravatar image

chilkat ♦♦

According to the HTTP protocol specifications, the following request methods (also known as verbs) never include a message body: GET, HEAD, DELETE. In other words, the Content-Length header is omitted because it is always 0. The reason I say this is because the QuickDeleteStr method should be sufficient to send any DELETE request. If custom header fields need to be added, then the SetRequestHeader method can be called once per custom header, prior to calling QuickDeleteStr.


answered Sep 18 '14 at 08:26

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Sep 18 '14 at 08:22

Seen: 1,068 times

Last updated: Sep 18 '14 at 08:26

powered by OSQA