Send http removal request

I need, how can I send an http removal request, I have embedded 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 have 404 status.

Does anyone know what I am missing?

PS: I am using xcode 3.2.3, simulator 4.0

+5
source share
1 answer

It seems that your deletion request is issued correctly, but the server selects the answer with a 404-document error not found.

Do you have control over the server application? Are you sure the server has a resource at this URL that responds to the delete request?

, , - HTTP , . Wireshark ( Mac). , Fiddler, .

+1

All Articles