gpt4 book ai didi

html - 请求错误 (invalid_request) - Android 浏览器

转载 作者:可可西里 更新时间:2023-11-01 16:35:15 24 4
gpt4 key购买 nike

我有一个本地运行的基本 Jetty 服务器。如果我拉起 http://localhost/servlet1在桌面上的网络浏览器中,我能够看到正确的内容(基本 html 页面)。但是,当我在 Android 模拟器 (2.2) 中导航到此站点时,出现以下错误:

Request Error (invalid_request) Your request could not be processed.

Request could not be handled This could be caused by a misconfiguration, or possibly a malformed request.

For assistance, contact your network support team.

知道可能是什么问题吗?如果这个基本任务不起作用,我不敢继续前进。

最佳答案

由于模拟器中网络堆栈的性质,您不能使用“localhost”或 127.0.0.1 连接到主机。尝试改用 10.0.2.2,因此:http://10.0.2.2/servlet1

来自 http://code.google.com/p/android/issues/detail?id=133 :

127.0.0.1 is the emulated system's own loopback interface, not the one running on your host development machine.

within the Android system, one should use 10.0.2.2 which is an alias specifically setup to contact your host 127.0.0.1

关于html - 请求错误 (invalid_request) - Android 浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3816761/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com