Add HttpClient.

This commit is contained in:
LukeMathWalker 2021-01-11 09:37:04 +00:00
parent 11f2f7d4db
commit b7634725db

View file

@ -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,