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:
parent
424e8d61a5
commit
28c7e097db
5 changed files with 6 additions and 6 deletions
|
@ -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" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue