Skip to content

Commit

Permalink
Add log message
Browse files Browse the repository at this point in the history
  • Loading branch information
waisingyiu committed Apr 16, 2024
1 parent 75dbb73 commit 0b7dae1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,20 @@ import java.net.http.HttpRequest
import java.net.URI
import java.net.http.HttpClient
import java.net.http.HttpResponse
import org.slf4j.{Logger, LoggerFactory}

trait FcmTransport {
def sendAsync(token: String, payload: FcmPayload, dryRun: Boolean): Future[String]
}

class FcmTransportJdkImpl(credential: GoogleCredentials, url: String, jsonFactory: JsonFactory) extends FcmTransport {

implicit val logger: Logger = LoggerFactory.getLogger(this.getClass)

private val httpClient: HttpClient = HttpClient.newHttpClient()

logger.info("HttpClient is instantiated")

private val charSet = StandardCharsets.UTF_8

private val mediaType = "application/json; charset=UTF-8"
Expand Down

0 comments on commit 0b7dae1

Please sign in to comment.