en-US/about_PSGopher.help.txt

TOPIC
    about_PSGopher
 
SHORT DESCRIPTION
    A PowerShell module to download resources via Gopher.
 
LONG DESCRIPTION
    The PSGopher module allows you to connect to Gopher and Gopher+ servers and
    download resources and attributes. It has one cmdlet, Invoke-GopherRequest
    (alias: igr).
 
EXAMPLES
Example 1: Viewing Contents
    This example connects to Floodgap's Gopher server and return the content.
 
    PS C:\> $response = Invoke-GopherRequest gopher://floodgap.com
    PS C:\> $response.Content
 
    Welcome to Floodgap Systems' official gopher server.
    Floodgap has served the gopher community since 1999
    (formerly gopher.ptloma.edu).
    […]
 
Example 2: Viewing Metadata
    The -Info parameter will retrieve attributes about a resource, if the server
    supports Gopher+.
 
    PS C:\> igr -Info gopher://example.com/article.txt
 
    INFO : 0article.txt /article.txt example.com 70 +
    ADMIN : {
                Admin: John Doe <jdoe@example.com>,
                Mod-Date: Sun Nov 28 15:24:21 2021 <20211128152421>
               }
    VIEWS : text/plain: <11k>
    ABSTRACT : This article exists for documentation purposes.
 
Example 3: Downloading Files
    You can download files with the `-OutFile` parameter.
 
    PS C:\> Invoke-GopherRequest 'gopher://example.org/pic.gif' -OutFile pic.gif
 
Example 4: Viewing Links
    The `Links` property of a successful Gopher request contains all of a page's
    links.
 
    PS C:\> (igr gopher://floodgap.com).Links | Select -First 1
 
    href : gopher://gopher.floodgap.com/gopher/proxy
    Type : 0
    Description : Does this gopher menu look correct?
    Resource : /gopher/proxy
    Server : gopher.floodgap.com
    Port : 70
    UrlLink : False
 
Example 5: Sending Input
    The `InputObject` parameter (or pipeline input) can be used to send a query
    string to a Gopher server.
 
    PS C:\> igr gopher://gopher.floodgap.com/7/v2/vs -InputObject 'search terms'
 
    Pipeline input is also supported:
 
    Read-Host -Prompt 'Search for' | igr 'gopher://gopher.floodgap.com/7/v2/vs'
 
    Due to how the PowerShell runtime handles [System.Uri] objects with non-HTTP
    and non-HTTPS schemes, it is strongly recommended that you use -InputObject
    when creating URIs with query strings. This cmdlet will do the URL-encoding
    for you when using this parameter. However, if you're bold, you can build a
    URL by hand for the -Uri parameter.
 
TROUBLESHOOTING NOTE
    There are a few bugs and missing features in this version:
 
Gopher+ Directory Listings Are Plain Text
    Gopher+ directory listings aren't fully supported by this version. While you
    can fetch any attributes with the -Info parameter and get them as an object,
    doing this on a menu/Gophermap or directory will return plain text. This may
    be updated in a future release.
 
Using SSL/TLS, Where Supported
    There is an unofficial specification for wrapping Gopher connections in TLS.
    This cmdlet supports that in two ways:
 
    1. The -TrySSL parameter will connect with opportunistic encryption. First,
       Invoke-GopherRequest will attempt to connect to the server securely. If
       it fails, it will fall back to a regular non-secured connection.
 
    2. The -UseSSL parameter will connect with mandatory encryption. Should the
       server fail to negotiate a TLS session, Invoke-GopherRequest will abort.
 
    Supplying a URL with a scheme of gophers, sgopher, or gopher+tls is the same
    as using the -UseSSL parameter.
     
    Note that Gopher predates SSL and TLS. What enthusiasts call "SecureGopher"
    did not exist back in Gopher's heyday; it's a recent invention, and there is
    no official standard. Thus, few servers support secure connections.
 
    The .NET runtime performs certificate validation. The server must present a
    valid certificate in order for the TLS connection to succeed.
 
SEE ALSO
 - about_Gopher
 - about_GopherUriScheme
 - Gopher+. http://gopherinfo.somnolescent.net/documentation/gopherplus.html
 
KEYWORDS
 - Gopher
 - Gopher+
 - GopherPlus
 - SecureGopher
 - SecureGopher+
 - SecureGopherPlus
 - retrocomputing
 - RFC 1436
 - RFC 4266
 - small web
 - WWW alternatives