File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
example/src/main/scala/example Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -123,9 +123,7 @@ object XMLHttpRequest{
123
123
@ JSExport
124
124
def main (pre : html.Pre ) = {
125
125
val xhr = new dom.XMLHttpRequest ()
126
- xhr.open(" GET" ,
127
- " https://www.boredapi.com/api/activity?type=recreational"
128
- )
126
+ xhr.open(" GET" , " https://www.boredapi.com/api/activity" )
129
127
xhr.onload = { (e : dom.Event ) =>
130
128
if (xhr.status == 200 ) {
131
129
pre.textContent = xhr.responseText
@@ -164,8 +162,7 @@ object AjaxExtension {
164
162
.ExecutionContext
165
163
.Implicits
166
164
.global
167
- val url =
168
- " https://www.boredapi.com/api/activity?type=recreational"
165
+ val url = " https://www.boredapi.com/api/activity"
169
166
Ajax .get(url).foreach { case xhr =>
170
167
pre.textContent = xhr.responseText
171
168
}
You can’t perform that action at this time.
0 commit comments