Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ private void sendData(HttpURLConnection conn, String data) throws SparkPostExcep
// Send data. At this point connection to server may not be established,
// but writing data to it will trigger the connection.
try (DataOutputStream wr = new DataOutputStream(conn.getOutputStream())) {

wr.writeBytes(data);
wr.write(data.getBytes(DEFAULT_CHARSET));
wr.flush();
} catch (IOException ex) {
throw new SparkPostException("Error sending request data:" + ex.toString());
Expand Down