1. Table of Contents
  2. About
  3. 1. Algorithms
    1. 1.1. Generate Random Values
    2. 1.2. Sort a Vector
  4. 2. Command Line
    1. 2.1. Argument Parsing
    2. 2.2. ANSI Terminal
  5. 3. Compression
    1. 3.1. Working with Tarballs
  6. 4. Concurrency
    1. 4.1. Explicit Threads
    2. 4.2. Data Parallelism
  7. 5. Cryptography
    1. 5.1. Hashing
    2. 5.2. Encryption
  8. 6. Data Structures
    1. 6.1. Bitfield
  9. 7. Database
    1. 7.1. SQLite
    2. 7.2. Postgres
  10. 8. Date and Time
    1. 8.1. Duration and Calculation
    2. 8.2. Parsing and Displaying
  11. 9. Development Tools
    1. 9.1. Debugging
      1. 9.1.1. Log Messages
      2. 9.1.2. Configure Logging
    2. 9.2. Versioning
    3. 9.3. Build Time Tooling
  12. 10. Encoding
    1. 10.1. Character Sets
    2. 10.2. CSV processing
    3. 10.3. Structured Data
  13. 11. Error Handling
    1. 11.1. Handle Error Variants
  14. 12. File System
    1. 12.1. Read & Write
    2. 12.2. Directory Traversal
  15. 13. Hardware Support
    1. 13.1. Processor
  16. 14. Memory Management
    1. 14.1. Global Static
  17. 15. Network
    1. 15.1. Server
  18. 16. Operating System
    1. 16.1. External Command
  19. 17. Science
    1. 17.1. Mathematics
      1. 17.1.1. Linear Algebra
      2. 17.1.2. Trigonometry
      3. 17.1.3. Complex Numbers
      4. 17.1.4. Statistics
      5. 17.1.5. Miscellaneous
  20. 18. Text Processing
    1. 18.1. Regular Expressions
    2. 18.2. String Parsing
  21. 19. Web Programming
    1. 19.1. Extracting Links
    2. 19.2. URL
    3. 19.3. Media Types
    4. 19.4. Clients
      1. 19.4.1. Making Requests
      2. 19.4.2. Calling a Web API
      3. 19.4.3. Downloads
      4. 19.4.4. Web Authentication

Rust Cookbook

Web Programming

Scraping Web Pages

RecipeCratesCategories
Extract all links from a webpage HTMLreqwest-badge select-badgecat-net-badge
Check webpage for broken linksreqwest-badge select-badge url-badgecat-net-badge
Extract all unique links from a MediaWiki markupreqwest-badge regex-badgecat-net-badge

Uniform Resource Locations (URL)

RecipeCratesCategories
Parse a URL from a string to a Url typeurl-badgecat-net-badge
Create a base URL by removing path segmentsurl-badgecat-net-badge
Create new URLs from a base URLurl-badgecat-net-badge
Extract the URL origin (scheme / host / port)url-badgecat-net-badge
Remove fragment identifiers and query pairs from a URLurl-badgecat-net-badge

Media Types (MIME)

RecipeCratesCategories
Get MIME type from stringmime-badgecat-encoding-badge
Get MIME type from filenamemime-badgecat-encoding-badge
Parse the MIME type of a HTTP responsemime-badge reqwest-badgecat-net-badge cat-encoding-badge

Clients

RecipeCratesCategories
Make a HTTP GET requestreqwest-badgecat-net-badge
Query the GitHub APIreqwest-badge serde-badgecat-net-badge cat-encoding-badge
Check if an API resource existsreqwest-badgecat-net-badge
Create and delete Gist with GitHub APIreqwest-badge serde-badgecat-net-badge cat-encoding-badge
Consume a paginated RESTful APIreqwest-badge serde-badgecat-net-badge cat-encoding-badge
Download a file to a temporary directoryreqwest-badge tempdir-badgecat-net-badge cat-filesystem-badge
Make a partial download with HTTP range headersreqwest-badgecat-net-badge
POST a file to paste-rsreqwest-badgecat-net-badge

Web Authentication

RecipeCratesCategories
Basic Authenticationreqwest-badgecat-net-badge