-3
This website当用户向下滚动时,会动态加载内容。向下滚动时,网站会发送一个AJAX请求(如开发工具>网络选项卡中所示),该请求会返回JSON数据。Ajax请求失败,同时网站可以成功创建相同的请求
当我手工制作的要求,无论是browsing to或通过我自己的要求:
$.ajax({
method: "POST",
url: "https://resultados4.museodelprado.es/CargadorResultados/CargarResultados",
success: function(response) {
data_holder = response;
}
});
它返回一个运行时错误。
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
如何发送AJAX请求以返回JSON数据而不是运行时错误?
编辑
This image shows the devtools > network
POST请求需要什么14表单参数? –
这是一个帖子请求,但没有一个空的身体 – Andreas
@Satpal相当肯定。我已经添加了devtool输出的视图。 –