February 2018
Intermediate to advanced
356 pages
9h 10m
English
As we can expect, we will integrate with the SendGrid services through the REST APIs. In our case, we will use the reactive WebClient provided by Spring WebFlux.
Now, we will use the SendGrid API Key created in the previous section. Our MailSender class should look like this:
package springfive.airline.mailservice.domain.service;import org.springframework.beans.factory.annotation.Value;import org.springframework.http.HttpStatus;import org.springframework.http.ReactiveHttpOutputMessage;import org.springframework.stereotype.Service;import org.springframework.web.reactive.function.BodyInserter;import org.springframework.web.reactive.function.BodyInserters;import org.springframework.web.reactive.function.client.WebClient ...