mirror of
https://github.com/LukeMathWalker/zero-to-production.git
synced 2024-12-18 14:06:37 +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 crate::domain::SubscriberEmail;
|
||||||
|
use reqwest::Client;
|
||||||
|
|
||||||
pub struct EmailClient;
|
pub struct EmailClient {
|
||||||
|
http_client: Client,
|
||||||
|
}
|
||||||
|
|
||||||
impl EmailClient {
|
impl EmailClient {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Self {
|
||||||
|
http_client: Client::new(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub async fn send_email(
|
pub async fn send_email(
|
||||||
&self,
|
&self,
|
||||||
recipient: SubscriberEmail,
|
recipient: SubscriberEmail,
|
||||||
|
|
Loading…
Reference in a new issue