Bye request should use POST not GET

AppRTCDemo is failing to cleanly exit a room because it sends a GET request to /bye. The request to /bye should be a POST request. Because the /bye request is failing, the room is still marked as "full" and rejoining will fail.

BUG=
R=tkchin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/47759004

Patch from Chuck Hays <haysc@webrtc.org>.

Cr-Commit-Position: refs/heads/master@{#8860}
This commit is contained in:
Chuck Hays 2015-03-25 12:59:52 -07:00 committed by Zeke Chin
parent 190c3ca7a9
commit caae5d47c1

View File

@ -141,7 +141,8 @@ static NSInteger const kARDAppEngineClientErrorBadResponse = -1;
NSString *urlString = NSString *urlString =
[NSString stringWithFormat:kARDRoomServerLeaveFormat, roomId, clientId]; [NSString stringWithFormat:kARDRoomServerLeaveFormat, roomId, clientId];
NSURL *url = [NSURL URLWithString:urlString]; NSURL *url = [NSURL URLWithString:urlString];
NSURLRequest *request = [NSURLRequest requestWithURL:url]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
request.HTTPMethod = @"POST";
NSURLResponse *response = nil; NSURLResponse *response = nil;
NSError *error = nil; NSError *error = nil;
// We want a synchronous request so that we know that we've left the room on // We want a synchronous request so that we know that we've left the room on