* 0.3.4

* Add `RequestOptions` for per-request customization with headers and timeouts

- Introduced the `RequestOptions` struct for flexible HTTP request configurations.
- Added `request_with_options` and `post_with_options` methods.
- Deprecated `request` and `post` in favor of the new methods.
- Updated examples and tests to reflect the new API.

* run cargo fmt

* Update HTTP client methods to use `request_with_options` for improved flexibility. Adjusted related test cases and examples accordingly.

* Format `request_with_options` calls for improved readability.

* - Downgrade `edition` from 2024 to 2021 in Cargo.toml files for compatibility.
- Fix nested `if let` statements to improve readability and correctness.
- Reorganize imports for consistency and structure.

* Restore github old workflows

* update ci

---------

Co-authored-by: geoffsee <>
This commit is contained in:
Geoff Seemueller
2025-08-28 15:25:28 -04:00
committed by GitHub
parent 9818998379
commit bbc21abc2b
10 changed files with 696 additions and 250 deletions

View File

@@ -6,8 +6,10 @@ on:
jobs:
build:
name: build-and-test (test-all.sh)
name: build-and-test (${{ matrix.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -31,12 +33,15 @@ jobs:
- name: Cargo fmt (check)
run: cargo fmt --all -- --check
- name: Clippy (default)
run: cargo clippy --all-targets -- -D warnings
- name: Ensure test-all.sh is executable
run: chmod +x ./scripts/test-all.sh
- name: Run comprehensive test suite
- name: Clippy
shell: bash
run: ./scripts/test-all.sh
run: cargo clippy --all-targets
- name: Tests
shell: bash
run: cargo test --all-features
- name: Build Docs
shell: bash
run: |
cargo doc -p hyper-custom-cert --no-deps

View File

@@ -10,8 +10,30 @@ env:
jobs:
docs:
name: Build and validate documentation (test-all.sh quick)
name: Build and validate documentation
runs-on: ubuntu-latest
defaults:
run:
working-directory: crates/hyper-custom-cert
strategy:
fail-fast: false
matrix:
include:
- name: default-features
features: ""
no-default-features: false
- name: no-default-features
features: ""
no-default-features: true
- name: rustls
features: "rustls"
no-default-features: true
- name: insecure-dangerous
features: "insecure-dangerous"
no-default-features: false
- name: all-features
features: "rustls,insecure-dangerous"
no-default-features: true
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -29,17 +51,42 @@ jobs:
- name: Setup Rust
run: rustup update stable && rustup default stable
- name: Ensure test-all.sh is executable
run: chmod +x ./scripts/test-all.sh
- name: Run test-all.sh (quick mode)
- name: Build documentation
shell: bash
run: ./scripts/test-all.sh --quick
run: |
FLAGS=""
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
echo "Running: cargo doc $FLAGS --no-deps"
cargo doc $FLAGS --no-deps
- name: Check documentation warnings
shell: bash
run: |
FLAGS=""
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
echo "Running: cargo doc $FLAGS --no-deps"
RUSTDOCFLAGS="-D warnings" cargo doc $FLAGS --no-deps
- name: Test documentation examples
shell: bash
run: |
FLAGS=""
if [ "${{ matrix.no-default-features }}" = "true" ]; then FLAGS="$FLAGS --no-default-features"; fi
if [ -n "${{ matrix.features }}" ]; then FLAGS="$FLAGS --features ${{ matrix.features }}"; fi
echo "Running: cargo test --doc $FLAGS"
cargo test --doc $FLAGS
test:
name: Test before release (test-all.sh)
name: Test before release
runs-on: ubuntu-latest
needs: docs
defaults:
run:
working-directory: crates/hyper-custom-cert
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -63,16 +110,13 @@ jobs:
- name: Cargo fmt (check)
run: cargo fmt --all -- --check
- name: Clippy (default)
run: cargo clippy --all-targets -- -D warnings
- name: Ensure test-all.sh is executable
run: chmod +x ./scripts/test-all.sh
- name: Run comprehensive test suite
- name: Clippy
shell: bash
run: ./scripts/test-all.sh
run: cargo clippy --all-targets
- name: Tests
shell: bash
run: cargo test --all-features
publish:
name: Publish to crates.io