Skip to content

Commit

Permalink
Merge pull request #22 from vapor-community/http
Browse files Browse the repository at this point in the history
Updates for http encoding.
  • Loading branch information
Andrewangeta committed Apr 13, 2018
2 parents 400914c + 9d82dcf commit f822859
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/SendGrid/Models/SendGridClient.swift
Expand Up @@ -22,7 +22,9 @@ public final class SendGridClient: Service {

encoder.dateEncodingStrategy = .secondsSince1970

let body = try encoder.encodeBody(from: email)
let data = try encoder.encode(email)

let body = HTTPBody(data: data)

let request = HTTPRequest(method: .POST, url: URL(string: apiEndpoint) ?? .root, headers: headers, body: body)

Expand Down

0 comments on commit f822859

Please sign in to comment.