wreq 1.2.4-aarch64-linux → 1.2.6-aarch64-linux

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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/crates/wreq-util/.github/FUNDING.yml +15 -0
  3. data/crates/wreq-util/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  4. data/crates/wreq-util/.github/ISSUE_TEMPLATE/custom.md +10 -0
  5. data/crates/wreq-util/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  6. data/crates/wreq-util/.github/dependabot.yml +22 -0
  7. data/crates/wreq-util/.github/workflows/ci.yml +82 -0
  8. data/crates/wreq-util/.github/workflows/release-plz.yml +52 -0
  9. data/crates/wreq-util/.gitignore +24 -0
  10. data/crates/wreq-util/CHANGELOG.md +74 -0
  11. data/crates/wreq-util/LICENSE +201 -0
  12. data/crates/wreq-util/README.md +62 -0
  13. data/crates/wreq-util/release-plz.toml +2 -0
  14. data/crates/wreq-util/rustfmt.toml +5 -0
  15. data/examples/emulate_request.rb +1 -1
  16. data/lib/wreq.rb +72 -45
  17. data/lib/wreq_ruby/3.3/wreq_ruby.so +0 -0
  18. data/lib/wreq_ruby/3.4/wreq_ruby.so +0 -0
  19. data/lib/wreq_ruby/4.0/wreq_ruby.so +0 -0
  20. data/lib/wreq_ruby/body.rb +30 -9
  21. data/lib/wreq_ruby/client.rb +88 -55
  22. data/lib/wreq_ruby/cookie.rb +81 -21
  23. data/lib/wreq_ruby/emulate.rb +77 -7
  24. data/lib/wreq_ruby/error.rb +5 -7
  25. data/lib/wreq_ruby/header.rb +205 -114
  26. data/lib/wreq_ruby/http.rb +74 -0
  27. data/lib/wreq_ruby/response.rb +31 -3
  28. data/script/build_windows_gnu.ps1 +6 -0
  29. data/test/body_sender_test.rb +246 -0
  30. data/test/cookie_test.rb +211 -10
  31. data/test/header_test.rb +228 -192
  32. data/test/json_precision_test.rb +209 -0
  33. data/test/option_validation_test.rb +311 -0
  34. data/test/stream_test.rb +36 -0
  35. data/test/value_semantics_test.rb +238 -0
  36. metadata +19 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 936d9cb40c7ac2e374399467f5c9adc55c1fd09d8deea4fe90de6880c1f795b2
4
- data.tar.gz: fd45170a2ba4f32c91d2d9ab400a37185238d63aafac91d5fce6628fd3851ae7
3
+ metadata.gz: 908bcf2c57df2f5b5307ac3e1705702cc37dea141a8e405d8677d41a66a1b27c
4
+ data.tar.gz: 4988ae3fd70f97aabc4cd628a007295eac6fc070f28eda0962be10507dbc5a14
5
5
  SHA512:
6
- metadata.gz: 00df3013fb3a63af15a53e2e11345c0a75edc6f5f79d76fc635d334e29fbd5acea018dab16ab4330f3fac773217c26d6651956cc69830b84d871d3c89e722cad
7
- data.tar.gz: 2fb7e6fc83a24d0ae7e0f0700e1e3f4a54bef73c9ddd0824c3371d0b2a543d9f36fe7b56bb016599ac90cd536fcfcb49ff687ca072de02163d121149a0cb0aad
6
+ metadata.gz: 61593576f9ad8326ee3e24308fda204b003c1144eec94d88ce6989389e605b90ad6f30b396f95ffef60bb4359241032c423c0b73cc0ba0787db31b1bbca7836e
7
+ data.tar.gz: 94a42f93749674470c97d9e7777827b20a908b316782858c51bf48093cec70187e251f590585d34c66583d8c8aa52b86f36b7c3193a09dff89ccd40a78699b65
@@ -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,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 0x676e67 <gngppz@gmail.com>
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,62 @@
1
+ # wreq-util
2
+
3
+ A collection of utilities to do common things with [wreq](https://github.com/0x676e67/wreq).
4
+
5
+ [![Crates.io](https://img.shields.io/crates/v/wreq-util.svg?logo=rust)](https://crates.io/crates/wreq-util)
6
+ [![GitHub License](https://img.shields.io/github/license/0x676e67/wreq-util)](https://github.com/0x676e67/wreq-util/blob/main/LICENSE)
7
+ [![Discord chat][discord-badge]][discord-url]
8
+
9
+ [discord-badge]: https://img.shields.io/discord/1486741856397164788.svg?logo=discord
10
+ [discord-url]: https://discord.gg/rfbvyFkgq3
11
+
12
+ See the [crate documentation](https://docs.rs/wreq-util/latest/wreq_util) for more details.
13
+
14
+ ## Features
15
+
16
+ **wreq-util** offers a set of [tower](https://github.com/tower-rs/tower) middleware and utilities designed specifically for the [wreq](https://github.com/0x676e67/wreq) HTTP client:
17
+
18
+ - **Emulation** various mainstream browsers (Chrome, Firefox, Safari, Opera, OkHttp) and their versions.
19
+ - **Delay/JitterDelay**: Add fixed or jittered delays to HTTP [request](https://docs.rs/http/latest/http/request/index.html) with customizable strategies and predicates.
20
+
21
+ ## Example
22
+
23
+ The following example uses the [Tokio](https://tokio.rs) runtime with optional features enabled by adding this to your `Cargo.toml`:
24
+
25
+ ```toml
26
+ [dependencies]
27
+ tokio = { version = "1", features = ["full"] }
28
+ wreq = "6.0.0-rc"
29
+ wreq-util = "3.0.0-rc"
30
+ ```
31
+
32
+ And then the code:
33
+
34
+ ```rust
35
+ use wreq::Client;
36
+ use wreq_util::Emulation;
37
+
38
+ #[tokio::main]
39
+ async fn main() -> wreq::Result<()> {
40
+ // Build a client
41
+ let client = Client::builder()
42
+ .emulation(Emulation::Chrome147)
43
+ .build()?;
44
+
45
+ // Use the API you're already familiar with
46
+ let resp = client.get("https://www.google.com").send().await?;
47
+ println!("{}", resp.text().await?);
48
+ Ok(())
49
+ }
50
+ ```
51
+
52
+ ## License
53
+
54
+ Licensed under either of Apache License, Version 2.0 ([LICENSE](./LICENSE) or http://www.apache.org/licenses/LICENSE-2.0).
55
+
56
+ ## Contribution
57
+
58
+ Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the [Apache-2.0](./LICENSE) license, shall be licensed as above, without any additional terms or conditions.
59
+
60
+ ## FAQ
61
+
62
+ **For all issues and feedback, please head over to the [wreq](https://github.com/0x676e67/wreq) repository.**
@@ -0,0 +1,2 @@
1
+ [workspace]
2
+ publish_features = ["tokio-rt"]
@@ -0,0 +1,5 @@
1
+ group_imports = "StdExternalCrate"
2
+ imports_granularity = "Crate"
3
+ reorder_imports = true
4
+ wrap_comments = true
5
+ comment_width = 100
@@ -11,7 +11,7 @@ require_relative "../lib/wreq"
11
11
  # Set when creating the Wreq::Client instance.
12
12
  # All requests from this client will use the specified emulation unless overridden.
13
13
  client = Wreq::Client.new(emulation: Wreq::Emulation.new(
14
- profile: Wreq::Profile::Chrome149,
14
+ profile: Wreq::Profile::Chrome150,
15
15
  platform: Wreq::Platform::MacOS,
16
16
  http2: true,
17
17
  headers: true