1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

Replace deprecated fetch with http get (#530)

Applied in https://github.com/nushell/nushell/pull/7796
This commit is contained in:
Kenichi Kamiya 2023-06-15 20:13:39 +09:00 committed by GitHub
parent 424e8d61a5
commit 28c7e097db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View file

@ -3,7 +3,7 @@ def dict [...word #word(s) to query the dictionary API but they have to make sen
] {
let query = ($word | str join %20)
let link = ('https://api.dictionaryapi.dev/api/v2/entries/en/' + ($query|str replace ' ' '%20'))
let output = (fetch $link | rename word)
let output = (http get $link | rename word)
let w = ($output.word | first)
if $w == "No Definitions Found" {