mirror of
https://github.com/LukeMathWalker/zero-to-production.git
synced 2024-12-18 22:16:40 +00:00
Add HttpClient.
This commit is contained in:
parent
11f2f7d4db
commit
b7634725db
1 changed files with 10 additions and 1 deletions
|
@ -1,8 +1,17 @@
|
|||
use crate::domain::SubscriberEmail;
|
||||
use reqwest::Client;
|
||||
|
||||
pub struct EmailClient;
|
||||
pub struct EmailClient {
|
||||
http_client: Client,
|
||||
}
|
||||
|
||||
impl EmailClient {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
http_client: Client::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn send_email(
|
||||
&self,
|
||||
recipient: SubscriberEmail,
|
||||
|
|
Loading…
Reference in a new issue