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

requestをやめる #6225

Closed
tamaina opened this issue Apr 6, 2020 · 6 comments · Fixed by #6228
Closed

requestをやめる #6225

tamaina opened this issue Apr 6, 2020 · 6 comments · Fixed by #6228
Labels
✨Feature This adds/improves/enhances a feature

Comments

@tamaina
Copy link
Contributor

tamaina commented Apr 6, 2020

Summary

requestはdeprecatedなのでaxiosなどを使う

@tamaina tamaina added the ✨Feature This adds/improves/enhances a feature label Apr 6, 2020
@tamaina
Copy link
Contributor Author

tamaina commented Apr 6, 2020

これ代替ライブラリ何にしますか?axiosしか知らないのでaxiosで実装しようと思うのですが…

@acid-chicken
Copy link
Member

node-fetch とか

@mei23
Copy link
Contributor

mei23 commented Apr 6, 2020

Deprecatedのお話
request/request#3142

Alternativesのお話
request/request#3143

@mei23
Copy link
Contributor

mei23 commented Apr 6, 2020

AP request を置き換えられるとうれしい (送信前にhttp-signatureを入れる必要がある)
https://github.com/syuilo/misskey/blob/bb7edfee04d990fcf56e0cee46f1da7b62693cb6/src/remote/activitypub/request.ts

@mei23
Copy link
Contributor

mei23 commented Apr 6, 2020

AP request は https のままでいいかも
axiosはconnection timeoutを検出するのにCancelTokenが必要だったり、エラーハンドリングが面倒だったのでnode-fetchの方がいいかも

@mei23
Copy link
Contributor

mei23 commented Apr 6, 2020

v10-m544だけどnode-fetchでこんな感じ
mei23@3c26a16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨Feature This adds/improves/enhances a feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants