Network

  • http — Various commands for working with http methods.
  • http delete — Delete the specified resource.
  • http get — Fetch the contents from a URL.
  • http head — Get the headers from a URL.
  • http options — Requests permitted communication options for a given URL.
  • http patch — Send a PATCH request to a URL with a request body.
  • http pool — Configure and reset builtin http connection pool.
  • http post — Send a POST request to a URL with a request body.
  • http put — Send a PUT request to a URL with a request body.
  • port — Get a free TCP port from system.
  • query web — execute selector query on html/web
  • query webpage-info — uses the webpage crate to extract info from html: title, description, language, links, RSS feeds, Opengraph, Schema.org, and more
  • url — Various commands for working with URLs.
  • url build-query — Converts record or table into query string applying percent-encoding.
  • url join — Convert a record to a URL string.
  • url parse — Parse a URL string into structured data.
  • url split-query — Converts query string into table applying percent-decoding.

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.

Tips

Intro

url parse splits a URL into fields.

"https://example.com/a" | url parse

A different URL parses the same way.

"https://example.com/b" | url parse

Basic

get host reads the host field.

"https://example.com/a" | url parse | get host

url join rebuilds a URL from its fields.

"https://example.com/a" | url parse | url join

Intermediate

Measure the host name.

"https://example.com/docs" | url parse | get host | str length

Measure the path field.

"https://example.com/a?b=1" | url parse | get path | str length

Advanced

Four steps from a URL to a number.

"https://e.com/docs" | url parse | get host | str length | math abs