axios-retry 相关问题


Axios 尝试使用 Axios 转发 POST 请求时出现 CanceledError 错误

当尝试使用 axios 将 POST 请求从 Express 后端转发到另一个后端时,我收到 axios 错误“CanceledError:请求流已中止”。这不...


如何使用axios在vuejs中渲染easydatatable

我使用 axios 获取这些数据 { “qtp1459016715-18382027”:{ “姓名”:“qtp1459016715-18382027”, “状态”:“5”, “优先”...


需要覆盖Axios post请求的默认时间

当我从客户端(React JS)使用axios向服务器(spring)发出post请求时,服务器的响应时间超过2分钟。因此,当...


如何使用 RestClient 进行可重试的调用

我想强制 Spring 6.1 RestClient 使用重试机制执行所有 http 调用。 理想情况下,我想复制使用 RestTemplate 和 spring-retry 可以实现的这种行为


Spock 测试失败,RetrySynchronizationManager.getContext() 为 null

我编写了一个 Spock 测试来使用 Spring-retry 来执行服务,但测试上下文未以某种方式正确设置。 具体错误是(@kriegaex插入的换行符): [错误]


React Native Axios 正在发送整个对象,而不仅仅是值

这让我发疯。我只是尝试将日期发布到我的 api,但收到“JSON 值无法转换为 System.DateTime”的 json 错误。 原因是axios或者


在loader中使用URL参数时出现错误

我在我的 React 项目中使用 React-Router。我有一个如下所示的移动页面: 从“反应”导入反应; 从 'axios' 导入 axios 导出异步函数加载器({ params }) { ...


如何在axios中获取onUploadProgress?

我对如何使用 axios 上传进度事件有点困惑。实际上我正在将大量文件存储到 aws s3 中。那么,如何获取上传进度呢?我需要 onUploadProgr 这个函数...


如何访问Google新闻标题链接

我正在对 Google 新闻文章网址进行 axios 调用,例如: 谷歌新闻链接: “https://news.google.com./articles/


node.js + wordpress 返回帖子数据

我正在开发一个node.js服务器来获取外部api数据,然后使用我的客户端从我的节点服务器获取数据,而不是调用api站点。 我正在使用express,axios,...


locahost 在 React 组件编辑时返回 ERR_CONNECTION_REFUSED

我使用 MEAN stack、nodemon 和 Parcel。每次当我编辑前端代码时,axios都会返回net::ERR_CONNECTION_REFUSED,我需要重新加载页面1-3次才能避免此错误。是什么原因造成的?...


如何减慢React应用程序中的Axios获取速率?

我目前面临一个问题,即我过快地向第三方 API 发出过多请求,超出了 API 的请求限制率并导致 409 错误状态代码。我的目标是


SignalR 阻止 axios 调用(挂起状态)

我目前正在开发一个项目,该项目具有对拍卖中可用产品进行竞价的功能。同样,我们需要实时更新出价。 因为可能有成千上万的用户来自


由于 URL 构造不正确(404 Not Found),React 组件未显示获取的数据

我正在开发一个 React 组件,以使用 Axios 从 Django REST Framework API 获取数据。但是,该组件没有显示获取的数据,并且我遇到了 404 Not Found 错误...


如何使用react native、expo、expressjs和mongodb修复“网络错误”

我目前正在开发一款用于学习目的的卡路里跟踪应用程序。现在我正在尝试使用 axios 将 React Native 前端连接到后端,但是出现以下错误:


Axios 调用 Square API 时出现“网络错误”

我正在使用 Vue.js 编写一个网站,作为在线商店。我的客户使用 Square 来管理店内购买,所以我认为如果该网站收集某些信息,对他们来说会是最简单的......


React Native Axios 获取响应已跳过且状态代码 0

我的 React Native 应用程序出现问题。在访问 API 时,我收到一个响应 Skipped 和状态代码 0。它是通过使用 Reactotron 记录 api 响应来显示的。但是当我console.log错误时,它


等待一系列axios调用返回

我正在编写一个用于提交时间表的 React 应用程序,并且在尝试一次提交一堆条目时遇到问题。每个条目都必须在单独的 API 调用中提交,所以我所拥有的......


在 Axios 实例中附加 MSAL 访问令牌作为承载令牌

在我的服务器中,所有路由都受到保护,并使用 azureAD 护照策略授权不记名令牌。因此,我需要将客户端中生成的访问令牌附加到每个请求...


React Axios Basic Authentication,如何防止弹出对话框显示

我已经实现了一个带有基本身份验证的API 当我提供正确的用户名和密码进行身份验证时,它工作正常, 但是,问题是当我提供错误的用户名/


为什么 CORS 配置为允许任何访问,登录时仍然出现 401 Unauthorized 错误?

经过几天的尝试解决以下问题后,我对以下问题感到不知所措。 我构建这个项目的上下文是 React/Axios/Spring Boot 3/Spring Security 6。 我收到 401 CORS unauthor...


预呈现页面“/”时发生错误。阅读更多:https://nextjs.org/docs/messages/prerender-error 修改请求(不知道如何)

已经四天了,我仍然陷入困境。 关于这个问题我看到有人说使用axios,并设置超时。或者在获取数据时将 http 更改为 https,但这一切都是徒劳的...


通过更少的 Java API 调用来映射 Google 云端硬盘内容的有效方法

大家好,我有一个代码,用于列出共享驱动器中存在的文件(以便稍后下载并创建相同的文件夹路径) 目前我做这样的事情: 哈希映射 大家好,我有一个代码,用于列出共享驱动器中存在的文件(以便稍后下载并创建相同的文件夹路径) 目前我正在做这样的事情: HashMap<String, Strin> foldersPathToID = new HashMap<>(); //searching all folders first saving their IDs searchAllFoldersRecursive(folderName.trim(), driveId, foldersPathToID); //then listing files in all folders HashMap<String, List<File>> pathFile = new HashMap<>(); for (Entry<String, String> pathFolder : foldersPathToID.entrySet()) { List<File> result = search(Type.FILE, pathFolder.getValue()); if (result.size() > 0) { String targetPathFolder = pathFolder.getKey().trim(); pathFile.putIfAbsent(targetPathFolder, new ArrayList<>()); for (File file : result) { pathFile.get(targetPathFolder).add(file); } } } 递归方法在哪里: private static void searchAllFoldersRecursive(String nameFold, String id, HashMap<String, String> map) throws IOException, RefreshTokenException { map.putIfAbsent(nameFold, id); List<File> result; result = search(Type.FOLDER, id); // dig deeper if (result.size() > 0) { for (File folder : result) { searchAllFoldersRecursive(nameFold + java.io.File.separator + normalizeName(folder.getName()), folder.getId(), map); } } } 搜索功能是: private static List<com.google.api.services.drive.model.File> search(Type type, String folderId) throws IOException, RefreshTokenException { String nextPageToken = "go"; List<File> driveFolders = new ArrayList<>(); com.google.api.services.drive.Drive.Files.List request = service.files() .list() .setQ("'" + folderId + "' in parents and mimeType" + (type == Type.FOLDER ? "=" : "!=") + "'application/vnd.google-apps.folder' and trashed = false") .setPageSize(100).setFields("nextPageToken, files(id, name)"); while (nextPageToken != null && nextPageToken.length() > 0) { try { FileList result = request.execute(); driveFolders.addAll(result.getFiles()); nextPageToken = result.getNextPageToken(); request.setPageToken(nextPageToken); return driveFolders; } catch (TokenResponseException tokenError) { if (tokenError.getDetails().getError().equalsIgnoreCase("invalid_grant")) { log.err("Token no more valid removing it Please retry"); java.io.File cred = new java.io.File("./tokens/StoredCredential"); if (cred.exists()) { cred.delete(); } throw new RefreshTokenException("Creds invalid will retry re allow for the token"); } log.err("Error while geting response with token for folder id : " + folderId, tokenError); nextPageToken = null; } catch (Exception e) { log.err("Error while reading folder id : " + folderId, e); nextPageToken = null; } } return new ArrayList<>(); } 我确信有一种方法可以通过很少的 api 调用(甚至可能是一个调用?)对每个文件(使用文件夹树路径)进行正确的映射,因为在我的版本中,我花了很多时间进行调用 service.files().list().setQ("'" + folderId+ "' in parents and mimeType" + (type == Type.FOLDER ? "=" : "!=") + "'application/vnd.google-apps.folder' and trashed = false").setPageSize(100).setFields("nextPageToken, files(id, name)"); 每个子文件夹至少一次......并且递归搜索所有内容需要很长时间。最后,映射比下载本身花费的时间更多...... 我搜索了文档,也在此处搜索,但没有找到任何内容来列出具有一个库的所有驱动器调用任何想法? 我想使用专用的 java API 来获取共享 GoogleDrive 中的所有文件及其相对路径,但调用次数尽可能少。 提前感谢您的时间和答复 我建议您使用高效的数据结构和逻辑来构建文件夹树并将文件映射到其路径,如下所示 private static void mapDriveContent(String driveId) throws IOException { // HashMap to store folder ID to path mapping HashMap<String, String> idToPath = new HashMap<>(); // HashMap to store files based on their paths HashMap<String, List<File>> pathToFile = new HashMap<>(); // Fetch all files and folders in the drive List<File> allFiles = fetchAllFiles(driveId); // Build folder path mapping and organize files for (File file : allFiles) { String parentId = (file.getParents() != null && !file.getParents().isEmpty()) ? file.getParents().get(0) : null; String path = buildPath(file, parentId, idToPath); if (file.getMimeType().equals("application/vnd.google-apps.folder")) { idToPath.put(file.getId(), path); } else { pathToFile.computeIfAbsent(path, k -> new ArrayList<>()).add(file); } } // Now, pathToFile contains the mapping of paths to files // Your logic to handle these files goes here } private static List<File> fetchAllFiles(String driveId) throws IOException { // Implement fetching all files and folders here // Make sure to handle pagination if necessary // ... } private static String buildPath(File file, String parentId, HashMap<String, String> idToPath) { // Build the file path based on its parent ID and the idToPath mapping // ... }


conda错误ssl证书:HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443

无论我做什么,我都会收到此错误 C:\Users\MyPc>conda update --all 解决环境:失败 CondaHTTPError:URL 的 HTTP 000 连接失败 无论我做什么,我都会收到此错误 C:\Users\MyPc>conda update --all Solving environment: failed CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/free/win-64/repodata.json.bz2> Elapsed: - An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way. If your current network has https://www.anaconda.com blocked, please file a support request with your network engineering team. SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/free/win-64/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))')) 我已经搜索了所有互联网,重新安装了 anaconda 并做了建议中的任何操作,但这个问题仍然存在。 Windows 10 C:\Users\MyPc>anaconda --version anaconda 命令行客户端(版本 1.7.2) C:\Users\MyPc>conda --version 康达 4.5.12 就我而言,当我尝试运行此命令时,我收到了此类错误消息 conda install tensorflow 这是错误消息 CondaSSLError:OpenSSL 似乎在此计算机上不可用。下载并安装软件包需要 OpenSSL。 异常:HTTPSConnectionPool(主机='repo.anaconda.com',端口=443):超过最大重试次数,网址:/pkgs/main/win-64/current_repodata.json(由SSLError(“无法连接到HTTPS URL”)引起因为 SSL 模块不可用。")) 这就是解决方案 步骤01 进入你的anaconda3的安装路径 步骤02 现在转到此文件路径 anaconda3\Library\bin 步骤03 现在选择这个 DLL 文件并复制它 libcrypto-1_1-x64.dll libssl-1_1-x64.dll 步骤04 之后转到此文件路径并将其粘贴到该文件夹内部 anaconda3\DLLs 这个命令对我有用: conda config --set ssl_verify false 我也遇到了同样的问题,解决这个问题的方法是安装早期的 32 位版本的 Conda。由于某种原因,较新的 64 位版本似乎容易出现此错误。您可以在这里找到 Conda 的早期版本: https://repo.continuum.io/archive/ 您应该搜索仅具有 x86 而不是 x86_64 的 Anaconda3 版本。 我也遇到了同样的问题,简单的解决方案是: 从开始菜单打开anaconda navigator,然后运行CMD.exe提示符,然后从那里安装,就是这样。 在 C:\Users\xyz 目录中创建一个名为 .condarc 的文件,其中包含以下内容 频道: 默认值 ssl_verify:假 然后尝试创建虚拟环境: conda create -n envname python=x.x anaconda 祝你好运!


© www.soinside.com 2019 - 2024. All rights reserved.