-
-
Notifications
You must be signed in to change notification settings - Fork 836
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Verify the URLRequest method setter can throw
- Loading branch information
Showing
4 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package { | ||
import flash.display.Sprite; | ||
public class Test extends Sprite { | ||
} | ||
} | ||
|
||
import flash.net.*; | ||
|
||
var request = new URLRequest(); | ||
|
||
request.url = null; | ||
|
||
var methods = ["GET", "get", "Get", "POST", "post", "PoST", "PUT", "put", "DELETE"]; | ||
for each (var method in methods) { | ||
trace("// '" + method + "' method"); | ||
try { | ||
request.method = method; | ||
trace("request.method: " + request.method); | ||
} catch (e) { | ||
trace("error: " + e); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// 'GET' method | ||
request.method: GET | ||
// 'get' method | ||
request.method: get | ||
// 'Get' method | ||
error: ArgumentError: Error #2008: Parameter method must be one of the accepted values. | ||
// 'POST' method | ||
request.method: POST | ||
// 'post' method | ||
request.method: post | ||
// 'PoST' method | ||
error: ArgumentError: Error #2008: Parameter method must be one of the accepted values. | ||
// 'PUT' method | ||
error: ArgumentError: Error #2008: Parameter method must be one of the accepted values. | ||
// 'put' method | ||
error: ArgumentError: Error #2008: Parameter method must be one of the accepted values. | ||
// 'DELETE' method | ||
error: ArgumentError: Error #2008: Parameter method must be one of the accepted values. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
num_frames = 1 |