File tree 2 files changed +21
-11
lines changed 2 files changed +21
-11
lines changed Original file line number Diff line number Diff line change
1
+ package requests
2
+
3
+ import utest ._
4
+ import ujson ._
5
+
6
+ object Scala2RequestTests extends TestSuite {
7
+ val tests = Tests {
8
+ test(" send" ){
9
+ requests.send(" get" )(" https://httpbin.org/get?hello=world&foo=baz" )
10
+
11
+ // This doesn't compile right in Scala3 for some reason
12
+ val res1 = requests.send(" put" )(
13
+ " https://httpbin.org/put" ,
14
+ data = Map (" hello" -> " world" , " foo" -> " baz" ),
15
+ chunkedUpload = true
16
+ ).text
17
+
18
+ assert(read(res1).obj(" form" ) == Obj (" foo" -> " baz" , " hello" -> " world" ))
19
+ }
20
+ }
21
+ }
Original file line number Diff line number Diff line change @@ -77,17 +77,6 @@ object RequestTests extends TestSuite{
77
77
assert(read(res1).obj(" form" ) == Obj (" foo" -> " baz" , " hello" -> " world" ))
78
78
}
79
79
}
80
- test(" send" ){
81
- requests.send(" get" )(" https://httpbin.org/get?hello=world&foo=baz" )
82
-
83
- val res1 = requests.send(" put" )(
84
- " https://httpbin.org/put" ,
85
- data = Map (" hello" -> " world" , " foo" -> " baz" ),
86
- chunkedUpload = true
87
- ).text
88
-
89
- assert(read(res1).obj(" form" ) == Obj (" foo" -> " baz" , " hello" -> " world" ))
90
- }
91
80
}
92
81
test(" multipart" ){
93
82
for (chunkedUpload <- Seq (true , false )) {
You can’t perform that action at this time.
0 commit comments