File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -73,12 +73,12 @@ mod _browser {
73
73
let mut opts = web_sys:: RequestInit :: new ( ) ;
74
74
75
75
match method {
76
- Some ( s) => opts. method ( s. as_str ( ) ) ,
77
- None => opts. method ( "GET" ) ,
76
+ Some ( s) => opts. set_method ( s. as_str ( ) ) ,
77
+ None => opts. set_method ( "GET" ) ,
78
78
} ;
79
79
80
80
if let Some ( body) = body {
81
- opts. body ( Some ( & convert:: py_to_js ( vm, body) ) ) ;
81
+ opts. set_body ( & convert:: py_to_js ( vm, body) ) ;
82
82
}
83
83
84
84
let request = web_sys:: Request :: new_with_str_and_init ( url. as_str ( ) , & opts)
@@ -226,7 +226,7 @@ mod _browser {
226
226
let weak_vm = weak_vm ( vm) ;
227
227
228
228
let mut opts = web_sys:: RequestInit :: new ( ) ;
229
- opts. method ( "GET" ) ;
229
+ opts. set_method ( "GET" ) ;
230
230
231
231
let request = web_sys:: Request :: new_with_str_and_init ( path. as_str ( ) , & opts)
232
232
. map_err ( |err| convert:: js_py_typeerror ( vm, err) ) ?;
You can’t perform that action at this time.
0 commit comments