Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: LorenzoLeonardo/curl-http-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.1.0
Choose a base ref
...
head repository: LorenzoLeonardo/curl-http-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.1.1
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Mar 3, 2024

  1. feat: rename structs

    LorenzoLeonardo committed Mar 3, 2024

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    3f69498 View commit details
  2. Version up to v2.1.1

    LorenzoLeonardo committed Mar 3, 2024

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    afa58f9 View commit details
Showing with 12 additions and 12 deletions.
  1. +1 −1 Cargo.lock
  2. +1 −1 Cargo.toml
  3. +10 −10 src/http_client.rs
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "curl-http-client"
version = "2.1.0"
version = "2.1.1"
edition = "2021"
authors = ["Lorenzo Leonardo <enzotechcomputersolutions@gmail.com>"]
license = "MIT"
20 changes: 10 additions & 10 deletions src/http_client.rs
Original file line number Diff line number Diff line change
@@ -42,16 +42,16 @@ where
/// [`Actor<C>`](https://docs.rs/async-curl/latest/async_curl/actor/trait.Actor.html) trait that can be cloned
/// to be able to handle multiple request sender and a single consumer that is spawned in the background to be able to achieve
/// non-blocking I/O during curl perform.
pub fn nonblocking<A: Actor<C>>(self, actor: A) -> AsyncHttpClient<C, A> {
AsyncHttpClient::<C, A> {
pub fn nonblocking<A: Actor<C>>(self, actor: A) -> AsyncPerform<C, A> {
AsyncPerform::<C, A> {
actor,
easy: self.easy,
}
}

/// This marks the end of the curl builder to be able to do synchronous operation during perform.
pub fn blocking(self) -> SyncHttpClient<C> {
SyncHttpClient::<C> { easy: self.easy }
pub fn blocking(self) -> SyncPerform<C> {
SyncPerform::<C> { easy: self.easy }
}

/// Sets the HTTP request.
@@ -787,9 +787,9 @@ where
}
}

/// The AsyncHttpClient struct is the result when calling nonblocking() function to signify the end of the builder.
/// The AsyncPerform struct is the result when calling nonblocking() function to signify the end of the builder.
/// The main job of this is to perform the Curl in nonblocking fashion.
pub struct AsyncHttpClient<C, A>
pub struct AsyncPerform<C, A>
where
C: Handler + Debug + Send + 'static,
A: Actor<C>,
@@ -803,7 +803,7 @@ where
easy: Easy2<C>,
}

impl<C, A> AsyncHttpClient<C, A>
impl<C, A> AsyncPerform<C, A>
where
C: ExtendedHandler + Debug + Send,
A: Actor<C>,
@@ -881,16 +881,16 @@ where
}
}

/// The SyncHttpClient struct is the result when calling blocking() function to signify the end of the builder.
/// The SyncPerform struct is the result when calling blocking() function to signify the end of the builder.
/// The main job of this is to perform the Curl in blocking fashion.
pub struct SyncHttpClient<C>
pub struct SyncPerform<C>
where
C: Handler + Debug + Send + 'static,
{
easy: Easy2<C>,
}

impl<C> SyncHttpClient<C>
impl<C> SyncPerform<C>
where
C: ExtendedHandler + Debug + Send,
{