|
9 | 9 |
|
10 | 10 | Future->needs_all( |
11 | 11 | do_request_json_for( $user, |
12 | | - method => "POST", |
13 | | - uri => "/v3/rooms/$room_id/send/sytest.dummy", |
| 12 | + method => "PUT", |
| 13 | + uri => "/v3/rooms/$room_id/send/sytest.dummy/253", |
14 | 14 | content => { |
15 | 15 | msgtype => "sytest.dummy", |
16 | 16 | body => 9007199254740992, # 2 ** 53 |
17 | 17 | }, |
18 | 18 | )->main::expect_m_bad_json, |
19 | 19 |
|
20 | 20 | do_request_json_for( $user, |
21 | | - method => "POST", |
22 | | - uri => "/v3/rooms/$room_id/send/sytest.dummy", |
| 21 | + method => "PUT", |
| 22 | + uri => "/v3/rooms/$room_id/send/sytest.dummy/-253", |
23 | 23 | content => { |
24 | 24 | msgtype => "sytest.dummy", |
25 | 25 | body => -9007199254740992, # -2 ** 53 |
|
38 | 38 | my ( $user, $room_id ) = @_; |
39 | 39 |
|
40 | 40 | do_request_json_for( $user, |
41 | | - method => "POST", |
42 | | - uri => "/v3/rooms/$room_id/send/sytest.dummy", |
| 41 | + method => "PUT", |
| 42 | + uri => "/v3/rooms/$room_id/send/sytest.dummy/1.1", |
43 | 43 | content => { |
44 | 44 | msgtype => "sytest.dummy", |
45 | 45 | body => 1.1, |
|
66 | 66 | Future->needs_all( |
67 | 67 | # Try some Perl magic values. |
68 | 68 | do_request_json_for( $user, |
69 | | - method => "POST", |
70 | | - uri => "/v3/rooms/$room_id/send/sytest.dummy", |
| 69 | + method => "PUT", |
| 70 | + uri => "/v3/rooms/$room_id/send/sytest.dummy/NaN", |
71 | 71 | content => { |
72 | 72 | msgtype => "sytest.dummy", |
73 | 73 | body => "NaN" + 0, |
74 | 74 | }, |
75 | 75 | )->main::expect_http_400, |
76 | 76 |
|
77 | 77 | do_request_json_for( $user, |
78 | | - method => "POST", |
79 | | - uri => "/v3/rooms/$room_id/send/sytest.dummy", |
| 78 | + method => "PUT", |
| 79 | + uri => "/v3/rooms/$room_id/send/sytest.dummy/inf", |
80 | 80 | content => { |
81 | 81 | msgtype => "sytest.dummy", |
82 | 82 | body => "inf" + 0, |
83 | 83 | }, |
84 | 84 | )->main::expect_http_400, |
85 | 85 |
|
86 | 86 | do_request_json_for( $user, |
87 | | - method => "POST", |
88 | | - uri => "/v3/rooms/$room_id/send/sytest.dummy", |
| 87 | + method => "PUT", |
| 88 | + uri => "/v3/rooms/$room_id/send/sytest.dummy/-inf", |
89 | 89 | content => { |
90 | 90 | msgtype => "sytest.dummy", |
91 | 91 | body => "-inf" + 0, |
|
94 | 94 |
|
95 | 95 | # Try some Python magic values. |
96 | 96 | $user->http->do_request( |
97 | | - method => "POST", |
98 | | - uri => "/v3/rooms/$room_id/send/sytest.dummy", |
| 97 | + method => "PUT", |
| 98 | + uri => "/v3/rooms/$room_id/send/sytest.dummy/Infinity", |
99 | 99 | params => { |
100 | 100 | access_token => $user->access_token, |
101 | 101 | }, |
|
104 | 104 | )->main::expect_http_400, |
105 | 105 |
|
106 | 106 | $user->http->do_request( |
107 | | - method => "POST", |
108 | | - uri => "/v3/rooms/$room_id/send/sytest.dummy", |
| 107 | + method => "PUT", |
| 108 | + uri => "/v3/rooms/$room_id/send/sytest.dummy/-Infinity", |
109 | 109 | params => { |
110 | 110 | access_token => $user->access_token, |
111 | 111 | }, |
|
114 | 114 | )->main::expect_http_400, |
115 | 115 |
|
116 | 116 | $user->http->do_request( |
117 | | - method => "POST", |
118 | | - uri => "/v3/rooms/$room_id/send/sytest.dummy", |
| 117 | + method => "PUT", |
| 118 | + uri => "/v3/rooms/$room_id/send/sytest.dummy/NaNBody", |
119 | 119 | params => { |
120 | 120 | access_token => $user->access_token, |
121 | 121 | }, |
|
0 commit comments