想象一下这种情况:
我使用Call.enqueue()方法启动 requestA ,然后在完成 requestA 之前,我同时启动 requestB requestA 的端点。当我使用Call.enqueue()方法时, requestB 将在 requestA 之后执行吗?还是enqueue()方法仅用于异步执行请求?
我在docs以及此处的StackOverflow上搜索了这些信息,但所有信息都只是关于此特定方法的肤浅信息。
这是我的代码-相同的代码用于两个请求:
* {
margin: 0;
padding: 0
}
html { height: 100% }
html,body,section {
display: flex;
flex-grow: 1
}
body {
scroll-snap-type: x mandatory;
scroll-snap-points-x: repeat(100%);
overflow-x: auto;
}
section {
display: grid;
place-items: center;
flex: 1 0 100%;
scroll-snap-align: center
}
section:nth-of-type(1) { background: orange }
section:nth-of-type(2) { background: limeGreen }
section:nth-of-type(3) { background: royalBlue }
h2 { color: white }