Skip to content

Commit 9b6ac10

Browse files
committed
feat!: rename to fetchttp
1 parent c8a0b03 commit 9b6ac10

File tree

16 files changed

+128
-129
lines changed

16 files changed

+128
-129
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Contributing to fetch-rs
1+
# Contributing to fetchttp
22

3-
Thank you for considering contributing to fetch-rs! This document provides guidelines for contributing to the project.
3+
Thank you for considering contributing to fetchttp! This document provides guidelines for contributing to the project.
44

55
## 🚀 Getting Started
66

@@ -14,8 +14,8 @@ Thank you for considering contributing to fetch-rs! This document provides guide
1414

1515
1. **Fork and Clone**
1616
```bash
17-
git clone https://github.com/your-username/fetch-rs.git
18-
cd fetch-rs
17+
git clone https://github.com/MuntasirSZN/fetchttp.git
18+
cd fetchttp
1919
```
2020

2121
2. **Install Dependencies**
@@ -64,8 +64,7 @@ type(scope): description
6464
- `refactor`: Code refactoring
6565
- `test`: Test additions/modifications
6666
- `chore`: Maintenance tasks
67-
68-
**Examples:**
67+
MuntasirSZN*
6968
```bash
7069
feat(headers): add support for custom header validation
7170
fix(client): handle connection timeout properly
@@ -169,7 +168,7 @@ mod tests {
169168
/// # Examples
170169
///
171170
/// ```rust
172-
/// use fetch::*;
171+
/// use fetchttp::*;
173172
///
174173
/// let result = function_name("example").unwrap();
175174
/// assert_eq!(result, "expected");
@@ -254,7 +253,7 @@ What actually happened.
254253
**Environment**
255254
- OS: [e.g. Windows 10, macOS 11, Ubuntu 20.04]
256255
- Rust Version: [e.g. 1.70.0]
257-
- fetch-rs Version: [e.g. 0.1.0]
256+
- fetchttp Version: [e.g. 0.1.0]
258257

259258
**Additional Context**
260259
Any other context about the problem.
@@ -412,4 +411,4 @@ Contributors will be recognized in:
412411
- Release notes
413412
- Project documentation
414413

415-
Thank you for contributing to fetch-rs! 🎉
414+
Thank you for contributing to fetchttp! 🎉

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
2-
name = "fetch"
2+
name = "fetchttp"
33
version = "0.1.0"
44
edition = "2021"
55
description = "`fetch` Web API Implementation In Rust!"
66
license = "MIT"
77
authors = ["MuntasirSZN <[email protected]>"]
8-
repository = "https://github.com/MuntasirSZN/fetch-rs"
8+
repository = "https://github.com/MuntasirSZN/fetchttp"
99
documentation = "https://docs.rs/fetch"
1010
readme = "README.md"
1111
keywords = ["fetch", "http", "client"]

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# fetch-rs
1+
# fetchttp
22

3-
[![Crates.io](https://img.shields.io/crates/v/fetch)](https://crates.io/crates/fetch)
4-
[![Documentation](https://docs.rs/fetch/badge.svg)](https://docs.rs/fetch)
3+
[![Crates.io](https://img.shields.io/crates/v/fetchttp)](https://crates.io/crates/fetch)
4+
[![Documentation](https://docs.rs/fetchttp/badge.svg)](https://docs.rs/fetch)
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6-
[![CI](https://github.com/MuntasirSZN/fetch-rs/workflows/CI/badge.svg)](https://github.com/MuntasirSZN/fetch-rs/actions)
6+
[![CI](https://github.com/MuntasirSZN/fetchttp/workflows/test/badge.svg)](https://github.com/MuntasirSZN/fetchttp/actions)
77

88
A **WHATWG Fetch API** compliant HTTP client library for Rust that provides the familiar `fetch()` interface you know and love from web development.
99

@@ -21,19 +21,19 @@ A **WHATWG Fetch API** compliant HTTP client library for Rust that provides the
2121

2222
## 🚀 Quick Start
2323

24-
Add `fetch` to your `Cargo.toml`:
24+
Add `fetchttp` to your `Cargo.toml`:
2525

2626
```toml
2727
[dependencies]
28-
fetch = "0.1.0"
28+
fetchttp = "0.1.0"
2929
tokio = { version = "1.0", features = ["full"] }
3030
serde_json = "1.0" # For JSON support
3131
```
3232

3333
### Simple GET Request
3434

3535
```rust
36-
use fetch::*;
36+
use fetchttp::*;
3737

3838
#[tokio::main]
3939
async fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -51,7 +51,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
5151
### POST Request with JSON
5252

5353
```rust
54-
use fetch::*;
54+
use fetchttp::*;
5555
use serde_json::json;
5656

5757
#[tokio::main]
@@ -78,7 +78,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
7878
### Custom Headers
7979

8080
```rust
81-
use fetch::*;
81+
use fetchttp::*;
8282

8383
#[tokio::main]
8484
async fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -100,7 +100,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
100100
### Request Cancellation
101101

102102
```rust
103-
use fetch::*;
103+
use fetchttp::*;
104104
use std::time::Duration;
105105
use tokio::time::sleep;
106106

@@ -287,7 +287,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
287287

288288
## 🌟 Comparison with Other Libraries
289289

290-
| Feature | fetch-rs | reqwest | hyper | ureq |
290+
| Feature | fetchttp | reqwest | hyper | ureq |
291291
|---------|----------|---------|-------|------|
292292
| WHATWG Fetch API |||||
293293
| Async/Await |||||
@@ -298,9 +298,9 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
298298

299299
## 🔗 Links
300300

301-
- [Documentation](https://docs.rs/fetch)
302-
- [Repository](https://github.com/MuntasirSZN/fetch-rs)
303-
- [Issues](https://github.com/MuntasirSZN/fetch-rs/issues)
301+
- [Documentation](https://docs.rs/fetchttp)
302+
- [Repository](https://github.com/MuntasirSZN/fetchttp)
303+
- [Issues](https://github.com/MuntasirSZN/fetchttp/issues)
304304
- [WHATWG Fetch Specification](https://fetch.spec.whatwg.org/)
305305

306306
---

benches/fetch_bench.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Criterion benchmarks for fetch operations
22
33
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
4-
use fetch::*;
4+
use fetchttp::*;
55
use std::hint::black_box;
66
use std::time::Duration;
77
use tokio::runtime::Runtime;
@@ -69,7 +69,7 @@ fn bench_headers_operations(c: &mut Criterion) {
6969
let mut headers = Headers::new();
7070
headers.set("content-type", "application/json").unwrap();
7171
headers.set("accept", "application/json").unwrap();
72-
headers.set("user-agent", "fetch-rs/0.1.0").unwrap();
72+
headers.set("user-agent", "fetchttp/0.1.0").unwrap();
7373
headers.set("authorization", "Bearer token").unwrap();
7474
headers.set("x-custom", "value").unwrap();
7575
black_box(())
@@ -184,7 +184,7 @@ fn bench_request_creation(c: &mut Criterion) {
184184
let mut headers = Headers::new();
185185
headers.set("content-type", "application/json").unwrap();
186186
headers.set("accept", "application/json").unwrap();
187-
headers.set("user-agent", "fetch-rs/0.1.0").unwrap();
187+
headers.set("user-agent", "fetchttp/0.1.0").unwrap();
188188

189189
let mut init = RequestInit::new();
190190
init.method = Some("POST".to_string());

benches/iai_bench.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! IAI-Callgrind benchmarks for instruction counting and cache analysis
22
3-
use fetch::*;
3+
use fetchttp::*;
44
use iai_callgrind::{
55
library_benchmark, library_benchmark_group, main, EventKind, FlamegraphConfig,
66
LibraryBenchmarkConfig, RegressionConfig, Tool, ValgrindTool,
@@ -23,7 +23,7 @@ fn headers_set_multiple() -> Headers {
2323
let mut headers = Headers::new();
2424
headers.set("content-type", "application/json").unwrap();
2525
headers.set("accept", "application/json").unwrap();
26-
headers.set("user-agent", "fetch-rs/0.1.0").unwrap();
26+
headers.set("user-agent", "fetchttp/0.1.0").unwrap();
2727
headers.set("authorization", "Bearer token").unwrap();
2828
headers.set("x-custom", "value").unwrap();
2929
headers
@@ -124,7 +124,7 @@ fn request_create_full_init() -> Request {
124124
let mut headers = Headers::new();
125125
headers.set("content-type", "application/json").unwrap();
126126
headers.set("accept", "application/json").unwrap();
127-
headers.set("user-agent", "fetch-rs/0.1.0").unwrap();
127+
headers.set("user-agent", "fetchttp/0.1.0").unwrap();
128128
headers.set("authorization", "Bearer token").unwrap();
129129

130130
let mut init = RequestInit::new();

src/abort.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! ## Basic Abort Controller
1010
//!
1111
//! ```rust
12-
//! use fetch::*;
12+
//! use fetchttp::*;
1313
//! use std::time::Duration;
1414
//! use tokio::time::sleep;
1515
//!
@@ -40,7 +40,7 @@
4040
//! ## Pre-aborted Signal
4141
//!
4242
//! ```rust
43-
//! use fetch::AbortSignal;
43+
//! use fetchttp::AbortSignal;
4444
//!
4545
//! // Create a signal that is already aborted
4646
//! let signal = AbortSignal::abort(Some("Operation cancelled".to_string()));
@@ -68,7 +68,7 @@ use std::sync::{Arc, Mutex};
6868
/// # Examples
6969
///
7070
/// ```rust
71-
/// use fetch::{AbortController, AbortSignal};
71+
/// use fetchttp::{AbortController, AbortSignal};
7272
///
7373
/// // Create through controller
7474
/// let controller = AbortController::new();
@@ -112,7 +112,7 @@ impl AbortSignal {
112112
/// # Examples
113113
///
114114
/// ```rust
115-
/// use fetch::AbortSignal;
115+
/// use fetchttp::AbortSignal;
116116
///
117117
/// let signal = AbortSignal::new();
118118
/// assert!(!signal.aborted());
@@ -139,7 +139,7 @@ impl AbortSignal {
139139
/// # Examples
140140
///
141141
/// ```rust
142-
/// use fetch::AbortSignal;
142+
/// use fetchttp::AbortSignal;
143143
///
144144
/// let signal = AbortSignal::abort(Some("Timeout".to_string()));
145145
/// assert!(signal.aborted());
@@ -170,7 +170,7 @@ impl AbortSignal {
170170
/// # Examples
171171
///
172172
/// ```rust
173-
/// use fetch::AbortController;
173+
/// use fetchttp::AbortController;
174174
///
175175
/// let controller = AbortController::new();
176176
/// let signal = controller.signal();
@@ -196,7 +196,7 @@ impl AbortSignal {
196196
/// # Examples
197197
///
198198
/// ```rust
199-
/// use fetch::AbortSignal;
199+
/// use fetchttp::AbortSignal;
200200
///
201201
/// let signal = AbortSignal::abort(Some("User cancelled".to_string()));
202202
/// assert_eq!(signal.reason().unwrap(), "User cancelled");
@@ -248,7 +248,7 @@ impl Default for AbortSignal {
248248
/// # Examples
249249
///
250250
/// ```rust
251-
/// use fetch::AbortController;
251+
/// use fetchttp::AbortController;
252252
///
253253
/// let controller = AbortController::new();
254254
/// let signal = controller.signal().clone();
@@ -277,7 +277,7 @@ impl AbortController {
277277
/// # Examples
278278
///
279279
/// ```rust
280-
/// use fetch::AbortController;
280+
/// use fetchttp::AbortController;
281281
///
282282
/// let controller = AbortController::new();
283283
/// assert!(!controller.signal().aborted());
@@ -300,7 +300,7 @@ impl AbortController {
300300
/// # Examples
301301
///
302302
/// ```rust
303-
/// use fetch::AbortController;
303+
/// use fetchttp::AbortController;
304304
///
305305
/// let controller = AbortController::new();
306306
/// let signal1 = controller.signal().clone();
@@ -323,7 +323,7 @@ impl AbortController {
323323
/// # Examples
324324
///
325325
/// ```rust
326-
/// use fetch::AbortController;
326+
/// use fetchttp::AbortController;
327327
///
328328
/// let controller = AbortController::new();
329329
/// let signal = controller.signal();

0 commit comments

Comments
 (0)