Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

配置自定义deepl接口,请求方式是form表单 #620

Closed
5 of 6 tasks
gufeng0 opened this issue Jul 23, 2024 · 6 comments
Closed
5 of 6 tasks

配置自定义deepl接口,请求方式是form表单 #620

gufeng0 opened this issue Jul 23, 2024 · 6 comments
Labels
bug Something isn't working need more info

Comments

@gufeng0
Copy link

gufeng0 commented Jul 23, 2024

请先确认以下事项:

  • 请务必查看 常见问题
  • 已仔细阅读了 README
  • issues 页面搜索过问题(包括已关闭的 issue),但未能找到解决方法
  • Easydict 已升级到 最新版本
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

问题描述

image

该问题是否可以稳定重现?

可重现

重现步骤

设置自定义url后
easydict://writeKeyValue?EZDeepLTranslateEndPointKey=http://in.tcyun:1188/translate

截图

image

期望结果

json请求

解决方案(可选)

No response

设备型号 && 系统版本

Intel macOS 14.21

是否愿意提交 PR 解决该问题?

  • 我愿意提交 PR
@gufeng0 gufeng0 added the bug Something isn't working label Jul 23, 2024
@tisfeng
Copy link
Owner

tisfeng commented Jul 23, 2024

DeepL API 是同时支持 JSON 和 Form 格式,Easydict 代码实现选择使用默认的表单格式,这个也没问题吧 😑

@gufeng0 你是遇到了什么问题吗?

92170

@gufeng0
Copy link
Author

gufeng0 commented Jul 23, 2024

DeepL API 是同时支持 JSON 和 Form 格式,Easydict 代码实现选择使用默认的表单格式,这个也没问题吧 😑

@gufeng0 你是遇到了什么问题吗?

92170

自建deeplx ,因为入参格式不对,请求报错404

@tisfeng
Copy link
Owner

tisfeng commented Jul 23, 2024

既然接口是你自己写的,那你服务端支持表单格式请求不就行了吗?你的接口按照 DeepL 官方文档来,自然可以在 Easydict 中使用。

DeepL API 的文档修改过,之前我记得它默认是表单格式,所以 Easydict 也是支持的表单。后面不知道什么时候改成了默认 JSON 格式,表单同时也是支持的,我担心如果 Easydict 从表单修改为 JSON 格式可能会对一些用户有影响,所以就没改。

88062

@gufeng0
Copy link
Author

gufeng0 commented Jul 23, 2024

既然是你自己写的,那你服务器支持表单格式请求不就行了吗?你的接口按照 DeepL 官方文档来,自然可以在 Easydict 中使用。

DeepL API 文档修改过,之前我记得默认是表单格式,所以 Easydict 也是支持的表单。后面不知道什么时候改成了默认 JSON 格式,表单同时也是支持的,我担心如果 Easydict 从表单修改为 JSON 格式可能会一些用户有影响,所以就没改。

但我看readme里面有写支持deeplx接口啊
image

@tisfeng
Copy link
Owner

tisfeng commented Jul 23, 2024

没看懂你的意思,Easydict 支持 DeepLX,DeepLX 也支持表单格式,有什么问题?

我自己的这个 DeepL 自定义接口用的就是 DeepLX

@gufeng0
Copy link
Author

gufeng0 commented Jul 25, 2024

没看懂你的意思,Easydict 支持 DeepLX,DeepLX 也支持表单格式,有什么问题?

我自己的这个 DeepL 自定义接口用的就是 DeepLX

我知道了,原来是需要调/v2/translate 才行

@gufeng0 gufeng0 closed this as completed Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need more info
Projects
None yet
Development

No branches or pull requests

2 participants