I need to how I can send an http delete request, I've implemented the code below
- (void) deleteSyncRequestWithURL:(NSString *) url
{
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
[request setURL:[NSURL URLWithString:url]];
[request setHTTPMethod:@"DELETE"];
_connection = [[NSURLConnection connectionWithRequest:request delegate:self] retain];
}
But I've got a 404 status.
Does anyone know what I'm missing??
P.S: I'm using xcode 3.2.3, simulator 4.0
It looks as if your Delete request is being issued correctly, but the server is choosing to respond with a 404 - document not found error.
Do you have control over the server application too? Are you sure the server has a resource at that URL that responds to a Delete request?
If you are suspicious of the Delete request being made - I would use an HTTP proxy to examine the request directly, you can then compare to your other client. I would use Wireshark (on the Mac). If the other client is on a PC, you could use Fiddler, which is excellent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With