wreq 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/Cargo.lock +3 -7
  3. data/Cargo.toml +6 -1
  4. data/crates/wreq-util/.github/FUNDING.yml +15 -0
  5. data/crates/wreq-util/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  6. data/crates/wreq-util/.github/ISSUE_TEMPLATE/custom.md +10 -0
  7. data/crates/wreq-util/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  8. data/crates/wreq-util/.github/dependabot.yml +22 -0
  9. data/crates/wreq-util/.github/workflows/ci.yml +82 -0
  10. data/crates/wreq-util/.github/workflows/release-plz.yml +52 -0
  11. data/crates/wreq-util/.gitignore +24 -0
  12. data/crates/wreq-util/CHANGELOG.md +74 -0
  13. data/crates/wreq-util/Cargo.toml +94 -0
  14. data/crates/wreq-util/LICENSE +201 -0
  15. data/crates/wreq-util/README.md +62 -0
  16. data/crates/wreq-util/examples/emulate.rs +39 -0
  17. data/crates/wreq-util/examples/tower_delay.rs +191 -0
  18. data/crates/wreq-util/release-plz.toml +2 -0
  19. data/crates/wreq-util/rustfmt.toml +5 -0
  20. data/crates/wreq-util/src/emulate/compress.rs +85 -0
  21. data/crates/wreq-util/src/emulate/macros.rs +370 -0
  22. data/crates/wreq-util/src/emulate/profile/chrome/header.rs +59 -0
  23. data/crates/wreq-util/src/emulate/profile/chrome/http2.rs +65 -0
  24. data/crates/wreq-util/src/emulate/profile/chrome/tls.rs +153 -0
  25. data/crates/wreq-util/src/emulate/profile/chrome.rs +2028 -0
  26. data/crates/wreq-util/src/emulate/profile/firefox/header.rs +21 -0
  27. data/crates/wreq-util/src/emulate/profile/firefox/http2.rs +113 -0
  28. data/crates/wreq-util/src/emulate/profile/firefox/tls.rs +253 -0
  29. data/crates/wreq-util/src/emulate/profile/firefox.rs +518 -0
  30. data/crates/wreq-util/src/emulate/profile/okhttp.rs +241 -0
  31. data/crates/wreq-util/src/emulate/profile/opera/header.rs +30 -0
  32. data/crates/wreq-util/src/emulate/profile/opera/http2.rs +50 -0
  33. data/crates/wreq-util/src/emulate/profile/opera/tls.rs +97 -0
  34. data/crates/wreq-util/src/emulate/profile/opera.rs +299 -0
  35. data/crates/wreq-util/src/emulate/profile/safari/header.rs +59 -0
  36. data/crates/wreq-util/src/emulate/profile/safari/http2.rs +116 -0
  37. data/crates/wreq-util/src/emulate/profile/safari/tls.rs +177 -0
  38. data/crates/wreq-util/src/emulate/profile/safari.rs +222 -0
  39. data/crates/wreq-util/src/emulate/profile.rs +47 -0
  40. data/crates/wreq-util/src/emulate.rs +369 -0
  41. data/crates/wreq-util/src/lib.rs +14 -0
  42. data/crates/wreq-util/src/rand.rs +24 -0
  43. data/crates/wreq-util/src/tower/delay/future.rs +43 -0
  44. data/crates/wreq-util/src/tower/delay/layer.rs +201 -0
  45. data/crates/wreq-util/src/tower/delay/service.rs +190 -0
  46. data/crates/wreq-util/src/tower/delay.rs +98 -0
  47. data/crates/wreq-util/src/tower.rs +7 -0
  48. data/crates/wreq-util/tests/client.rs +51 -0
  49. data/crates/wreq-util/tests/emulate_chrome.rs +270 -0
  50. data/crates/wreq-util/tests/emulate_firefox.rs +92 -0
  51. data/crates/wreq-util/tests/emulate_okhttp.rs +46 -0
  52. data/crates/wreq-util/tests/emulate_opera.rs +113 -0
  53. data/crates/wreq-util/tests/emulate_safari.rs +151 -0
  54. data/crates/wreq-util/tests/support/mod.rs +55 -0
  55. data/crates/wreq-util/tests/support/server.rs +232 -0
  56. data/examples/emulate_request.rb +1 -1
  57. data/lib/wreq.rb +20 -18
  58. data/lib/wreq_ruby/body.rb +3 -0
  59. data/lib/wreq_ruby/client.rb +18 -18
  60. data/lib/wreq_ruby/cookie.rb +2 -2
  61. data/lib/wreq_ruby/emulate.rb +3 -1
  62. data/lib/wreq_ruby/header.rb +205 -114
  63. data/lib/wreq_ruby/response.rb +28 -3
  64. data/src/emulate.rs +1 -0
  65. data/src/error.rs +2 -6
  66. data/src/header/helper.rs +112 -0
  67. data/src/header.rs +198 -133
  68. data/test/header_test.rb +228 -192
  69. data/test/stream_test.rb +36 -0
  70. metadata +54 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b6f6be1747be018573cd9de556975068d57c30a0b25f324d0b89a8f018df1aa
4
- data.tar.gz: 1181f1066b7c5fafb176def4dc1de0a27c192ff3fa9e499afe7f3ec3a70a8b28
3
+ metadata.gz: 32fccd5de0a2dc902b5ff76a4354b5271f30151718388715d9563c72d702fce3
4
+ data.tar.gz: 6623c40db0fbe229026c4214b0c183e700b595329583d96b19aa3858d6a07943
5
5
  SHA512:
6
- metadata.gz: c641ca408b98ac698cbb17a23c11d78215639793d7a90917058d3de58faa6c89ba403998b49c9b4551b7c237bab0d30e2cb8cfeae161f2c4207d679fb141fdf0
7
- data.tar.gz: 4d57654f2abd06b9d7ad63fb59df28a5ab68bb211479769828384dc87f1ab87fa638c4a39f0215b73b7759dc428b75214afbae91af39febc1c18d4361fc23ab2
6
+ metadata.gz: b17c6b0586311dc5144cba1ac348a7ac6754028ad51d9727b451f213fa77ab341a7ece9969ba62bd4eb6762de2a8940c12e4c0210e64016b39be72cf2bb63ada
7
+ data.tar.gz: bff84ec0a74f02523966d3f28d4772db404e142a7f9b4b16f3e74e62f322120d18750431c5dbc81db5489da75e7145219c39d13d7b6534955fc250b0c9b3b78e
data/Cargo.lock CHANGED
@@ -113,8 +113,7 @@ dependencies = [
113
113
  [[package]]
114
114
  name = "btls"
115
115
  version = "0.5.6"
116
- source = "registry+https://github.com/rust-lang/crates.io-index"
117
- checksum = "2c5e60b8c8d282c86360cab651ded04ab0335a7b5390c8d34145cbeab8cacf5f"
116
+ source = "git+https://github.com/0x676e67/btls?branch=demo%2Fmerge-upstream-boring-20260616#397dfae69044c0c19ba3028e8b25f8481fbc0f00"
118
117
  dependencies = [
119
118
  "bitflags",
120
119
  "btls-sys",
@@ -126,8 +125,7 @@ dependencies = [
126
125
  [[package]]
127
126
  name = "btls-sys"
128
127
  version = "0.5.6"
129
- source = "registry+https://github.com/rust-lang/crates.io-index"
130
- checksum = "9b1b8638a2e1c38a5ae4efa90ae57e643baec35a30d03fc5b399b893adc4954b"
128
+ source = "git+https://github.com/0x676e67/btls?branch=demo%2Fmerge-upstream-boring-20260616#397dfae69044c0c19ba3028e8b25f8481fbc0f00"
131
129
  dependencies = [
132
130
  "bindgen",
133
131
  "cmake",
@@ -1537,7 +1535,7 @@ dependencies = [
1537
1535
 
1538
1536
  [[package]]
1539
1537
  name = "wreq-ruby"
1540
- version = "1.2.4"
1538
+ version = "1.2.5"
1541
1539
  dependencies = [
1542
1540
  "arc-swap",
1543
1541
  "bytes",
@@ -1559,8 +1557,6 @@ dependencies = [
1559
1557
  [[package]]
1560
1558
  name = "wreq-util"
1561
1559
  version = "3.0.0-rc.14"
1562
- source = "registry+https://github.com/rust-lang/crates.io-index"
1563
- checksum = "1d8d73c75be86fbde675988dbe5cb15f02567025c13f6ffab910361ad1ba6c89"
1564
1560
  dependencies = [
1565
1561
  "brotli",
1566
1562
  "flate2",
data/Cargo.toml CHANGED
@@ -6,7 +6,7 @@ homepage = "https://github.com/SearchApi/wreq-ruby"
6
6
  repository = "https://github.com/SearchApi/wreq-ruby"
7
7
  edition = "2024"
8
8
  rust-version = "1.85"
9
- version = "1.2.4"
9
+ version = "1.2.5"
10
10
 
11
11
  [lib]
12
12
  crate-type = ["cdylib"]
@@ -52,3 +52,8 @@ incremental = false
52
52
  lto = "fat"
53
53
  opt-level = 3
54
54
  strip = true
55
+
56
+ [patch.crates-io]
57
+ btls = { git = "https://github.com/0x676e67/btls", branch = "demo/merge-upstream-boring-20260616" }
58
+ btls-sys = { git = "https://github.com/0x676e67/btls", branch = "demo/merge-upstream-boring-20260616" }
59
+ wreq-util = { path = "crates/wreq-util" }
@@ -0,0 +1,15 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi:
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12
+ polar: # Replace with a single Polar username
13
+ buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14
+ thanks_dev: # Replace with a single thanks.dev username
15
+ custom: ['https://github.com/0x676e67/0x676e67/blob/main/SPONSOR.md']
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Screenshots**
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ **Desktop (please complete the following information):**
27
+ - OS: [e.g. iOS]
28
+ - Browser [e.g. chrome, safari]
29
+ - Version [e.g. 22]
30
+
31
+ **Smartphone (please complete the following information):**
32
+ - Device: [e.g. iPhone6]
33
+ - OS: [e.g. iOS8.1]
34
+ - Browser [e.g. stock browser, safari]
35
+ - Version [e.g. 22]
36
+
37
+ **Additional context**
38
+ Add any other context about the problem here.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: Custom issue template
3
+ about: Describe this issue template's purpose here.
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,22 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "github-actions"
9
+ # Workflow files stored in the
10
+ # default location of `.github/workflows`
11
+ directory: "/"
12
+ schedule:
13
+ interval: "weekly"
14
+ - package-ecosystem: "cargo"
15
+ directory: "/"
16
+ schedule:
17
+ interval: "weekly"
18
+ # todo: if only this worked, see https://github.com/dependabot/dependabot-core/issues/4009
19
+ # only tell us if there's a new 'breaking' change we could upgrade to
20
+ # versioning-strategy: increase-if-necessary
21
+ # disable regular version updates, security updates are unaffected
22
+ open-pull-requests-limit: 0
@@ -0,0 +1,82 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
11
+ cancel-in-progress: true
12
+
13
+ permissions:
14
+ contents: write
15
+ packages: write
16
+
17
+ jobs:
18
+ style:
19
+ name: Style
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v7
23
+ - uses: actions-rs/toolchain@v1
24
+ with:
25
+ toolchain: stable
26
+ override: true
27
+ - name: Style check
28
+ run: cargo fmt --all -- --check
29
+ - name: Clippy check
30
+ run: cargo clippy --all-targets --all-features
31
+
32
+ docs:
33
+ name: Docs
34
+ runs-on: ubuntu-latest
35
+ steps:
36
+ - uses: actions/checkout@v7
37
+ - uses: actions-rs/toolchain@v1
38
+ with:
39
+ toolchain: stable
40
+ override: true
41
+ - name: Build docs
42
+ run: cargo doc --document-private-items --all-features
43
+
44
+ tests:
45
+ name: Tests
46
+ runs-on: ubuntu-latest
47
+ steps:
48
+ - uses: actions/checkout@v7
49
+ - uses: actions-rs/toolchain@v1
50
+ with:
51
+ toolchain: stable
52
+ override: true
53
+ - uses: taiki-e/install-action@v2
54
+ with:
55
+ tool: cargo-nextest
56
+ - name: Tests
57
+ run: |
58
+ set -euxo pipefail
59
+ cargo nextest run --workspace
60
+
61
+ linux:
62
+ name: Linux
63
+ needs: [style, tests, docs]
64
+ runs-on: ubuntu-latest
65
+ environment: Linux
66
+ if: startsWith(github.ref, 'refs/tags/')
67
+ steps:
68
+ - uses: actions/checkout@v7
69
+ - uses: actions-rs/toolchain@v1
70
+ with:
71
+ toolchain: stable
72
+ override: true
73
+ - uses: katyo/publish-crates@v2
74
+ with:
75
+ registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
76
+ ignore-unpublished-changes: true
77
+ - name: Upload binaries to GitHub Release
78
+ uses: softprops/action-gh-release@v3
79
+ with:
80
+ token: ${{ secrets.GITHUB_TOKEN }}
81
+ prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
82
+ generate_release_notes: true
@@ -0,0 +1,52 @@
1
+ name: Release-plz
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ release-plz-release:
10
+ name: Release-plz release
11
+ runs-on: ubuntu-latest
12
+ if: ${{ github.repository_owner == '0x676e67' }}
13
+ permissions:
14
+ contents: write
15
+ id-token: write
16
+ steps:
17
+ - &checkout
18
+ name: Checkout repository
19
+ uses: actions/checkout@v7
20
+ with:
21
+ fetch-depth: 0
22
+ persist-credentials: true
23
+ token: ${{ secrets.RELEASE_PLZ_TOKEN }}
24
+ - &install-rust
25
+ name: Install Rust toolchain
26
+ uses: dtolnay/rust-toolchain@stable
27
+ - name: Run release-plz
28
+ uses: release-plz/action@v0.5
29
+ with:
30
+ command: release
31
+ env:
32
+ GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
33
+
34
+ release-plz-pr:
35
+ name: Release-plz PR
36
+ runs-on: ubuntu-latest
37
+ if: ${{ github.repository_owner == '0x676e67' }}
38
+ permissions:
39
+ pull-requests: write
40
+ contents: write
41
+ concurrency:
42
+ group: release-plz-${{ github.ref }}
43
+ cancel-in-progress: false
44
+ steps:
45
+ - *checkout
46
+ - *install-rust
47
+ - name: Run release-plz
48
+ uses: release-plz/action@v0.5
49
+ with:
50
+ command: release-pr
51
+ env:
52
+ GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
@@ -0,0 +1,24 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ debug
4
+ target
5
+ Cargo.lock
6
+
7
+ # These are backup files generated by rustfmt
8
+ **/*.rs.bk
9
+
10
+ # MSVC Windows builds of rustc generate these, which store debugging information
11
+ *.pdb
12
+
13
+ # Generated by cargo mutants
14
+ # Contains mutation testing data
15
+ **/mutants.out*/
16
+
17
+ # RustRover
18
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
19
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
20
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
21
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
22
+ #.idea/
23
+ .vscode
24
+ .zed
@@ -0,0 +1,74 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [3.0.0-rc.14](https://github.com/0x676e67/wreq-util/compare/v3.0.0-rc.13...v3.0.0-rc.14) - 2026-07-04
11
+
12
+ ### Fixed
13
+
14
+ - *(emulate)* Fix chrome accept header `q` value ([#101](https://github.com/0x676e67/wreq-util/pull/101))
15
+
16
+ ### Other
17
+
18
+ - *(deps)* bump actions/checkout from 6 to 7 ([#100](https://github.com/0x676e67/wreq-util/pull/100))
19
+
20
+ ## [3.0.0-rc.13](https://github.com/0x676e67/wreq-util/compare/v3.0.0-rc.12...v3.0.0-rc.13) - 2026-06-19
21
+
22
+ ### Added
23
+
24
+ - add Emulation::weighted_random for traffic-weighted profile selection ([#97](https://github.com/0x676e67/wreq-util/pull/97))
25
+
26
+ ### Other
27
+
28
+ - Add Chrome 149 to emulation profiles ([#99](https://github.com/0x676e67/wreq-util/pull/99))
29
+
30
+ ## [3.0.0-rc.12](https://github.com/0x676e67/wreq-util/compare/v3.0.0-rc.11...v3.0.0-rc.12) - 2026-06-03
31
+
32
+ ### Added
33
+
34
+ - *(emulate)* Add Firefox 150-151 ([#93](https://github.com/0x676e67/wreq-util/pull/93))
35
+ - *(emulate)* Add Chrome/Edge 148,Opera 131,Safari 26-2/4 ([#92](https://github.com/0x676e67/wreq-util/pull/92))
36
+ - *(emulate)* export enum variants ([#87](https://github.com/0x676e67/wreq-util/pull/87))
37
+ - *(emulation)* add Chrome and Edge 146-147 ([#86](https://github.com/0x676e67/wreq-util/pull/86))
38
+ - *(emulation)* add Opera 120-130 and Firefox 148-149 support ([#82](https://github.com/0x676e67/wreq-util/pull/82))
39
+
40
+ ### Fixed
41
+
42
+ - *(emulate)* fix HTTP2 configuration for OkHttp ([#94](https://github.com/0x676e67/wreq-util/pull/94))
43
+ - fix build
44
+ - fix chrome grease value and brand order ([#91](https://github.com/0x676e67/wreq-util/pull/91))
45
+ - fix
46
+
47
+ ### Other
48
+
49
+ - Update Cargo.toml
50
+ - Update Cargo.toml
51
+ - Update README.md
52
+ - fix docs build ([#95](https://github.com/0x676e67/wreq-util/pull/95))
53
+ - Update wreq and wreq-util versions in README
54
+ - release-plz.yml
55
+ - *(deps)* bump softprops/action-gh-release from 2 to 3 ([#89](https://github.com/0x676e67/wreq-util/pull/89))
56
+ - Add Discord chat badge to README
57
+ - Add rustfmt configuration settings
58
+ - Update issue submission instructions in README
59
+ - Update Cargo.toml
60
+ - Update copyright year and owner in LICENSE file
61
+ - Revise contributing section and add FAQ
62
+ - Update Apache-2.0
63
+ - export
64
+ - Update Cargo.toml
65
+ - update deps
66
+ - update
67
+ - *(macros)* fmt code ([#85](https://github.com/0x676e67/wreq-util/pull/85))
68
+ - *(macros)* fmt code
69
+ - Fix variable naming in emulate.rs
70
+ - *(emulation)* refine abstraction for emulation settings ([#84](https://github.com/0x676e67/wreq-util/pull/84))
71
+ - fmt
72
+ - Change 'Overview' header to 'Features'
73
+ - *(mod)* use `emulate` when applying `emulation` ([#83](https://github.com/0x676e67/wreq-util/pull/83))
74
+ - Update `Contributing` section in `README.md` ([#81](https://github.com/0x676e67/wreq-util/pull/81))
@@ -0,0 +1,94 @@
1
+ [package]
2
+ name = "wreq-util"
3
+ description = "Common utilities for wreq"
4
+ repository = "https://github.com/0x676e67/wreq-util"
5
+ documentation = "https://docs.rs/wreq-util"
6
+ keywords = ["http", "client", "emulation", "ja3", "ja4"]
7
+ authors = ["0x676e67 <gngppz@gmail.com>"]
8
+ version = "3.0.0-rc.14"
9
+ readme = "README.md"
10
+ license = "Apache-2.0"
11
+ edition = "2024"
12
+ rust-version = "1.85"
13
+
14
+ [package.metadata.docs.rs]
15
+ all-features = true
16
+ rustdoc-args = ["--cfg", "docsrs"]
17
+ targets = ["x86_64-unknown-linux-gnu"]
18
+
19
+ [features]
20
+ default = ["emulation"]
21
+
22
+ tokio-rt = ["wreq/tokio-rt"]
23
+ compio-rt = ["wreq/compio-rt"]
24
+
25
+ emulation = ["dep:typed-builder", "dep:brotli", "dep:flate2", "dep:zstd"]
26
+ emulation-serde = ["dep:serde"]
27
+ emulation-compression = []
28
+
29
+ tower-delay = ["dep:tower", "dep:pin-project-lite", "tokio/time"]
30
+
31
+ [dependencies]
32
+ wreq = { version = "6.0.0-rc", default-features = false }
33
+
34
+ # Optional deps...
35
+
36
+ serde = { version = "1.0.228", features = ["derive"], optional = true }
37
+ tokio = { version = "1.52.1", default-features = false, optional = true }
38
+ tower = { version = "0.5.2", default-features = false, optional = true }
39
+ typed-builder = { version = "0.23.2", optional = true }
40
+ pin-project-lite = { version = "0.2.17", optional = true }
41
+
42
+ ## Compression algorithms
43
+ brotli = { version = "8.0.2", optional = true }
44
+ flate2 = { version = "1.1.9", optional = true }
45
+ zstd = { version = "0.13.3", optional = true }
46
+
47
+ [dev-dependencies]
48
+ wreq = "6.0.0-rc"
49
+ tokio = { version = "1.48.0", features = ["full"] }
50
+ hyper = { version = "1.10.1", default-features = false, features = [
51
+ "http1",
52
+ "http2",
53
+ "server",
54
+ ] }
55
+ hyper-util = { version = "0.1.20", features = [
56
+ "http1",
57
+ "http2",
58
+ "server-auto",
59
+ "tokio",
60
+ ] }
61
+ http = "1"
62
+
63
+ [lib]
64
+ doctest = false
65
+
66
+ [[test]]
67
+ name = "client"
68
+ path = "tests/client.rs"
69
+
70
+ [[test]]
71
+ name = "emulate_chrome"
72
+ path = "tests/emulate_chrome.rs"
73
+
74
+ [[test]]
75
+ name = "emulate_okhttp"
76
+ path = "tests/emulate_okhttp.rs"
77
+
78
+ [[test]]
79
+ name = "emulate_firefox"
80
+ path = "tests/emulate_firefox.rs"
81
+
82
+ [[test]]
83
+ name = "emulate_safari"
84
+ path = "tests/emulate_safari.rs"
85
+
86
+ [[example]]
87
+ name = "emulate"
88
+ path = "examples/emulate.rs"
89
+ required-features = ["emulation"]
90
+
91
+ [[example]]
92
+ name = "tower_delay"
93
+ path = "examples/tower_delay.rs"
94
+ required-features = ["tower-delay"]