module HostMeta

Overview

A Web Host Metadata client for Crystal.

Defined in:

host_meta.cr
host_meta/client.cr
host_meta/result.cr

Class Method Summary

Class Method Detail

def self.query(host, *args) #

Returns the result of querying the specified host.

h = HostMeta.query("epiktistes.com") # => #<HostMeta::Result:0x10e99...>
h.links("lrdd").first.template # => "https://epiktistes.com/.well-known/webfinger?resource={uri}"

Raises HostMeta::NotFoundError if the host does not exist and HostMeta::RedirectionError if redirection fails. Otherwise, returns HostMeta::Result.


[View source]