Skip to content

Commit e6454b8

Browse files
committed
Merge pull request #36 from sendgrid/useragent
Add useragent
2 parents ba6d907 + 6b8da96 commit e6454b8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/java/com/sendgrid/SendGrid.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
import java.io.FileNotFoundException;
1919

2020
public class SendGrid {
21+
public final String VERSION = "1.0.0";
22+
2123
private String username;
2224
private String password;
2325
private String url;
@@ -29,6 +31,7 @@ public SendGrid(String username, String password) {
2931
this.password = password;
3032
this.url = "https://api.sendgrid.com";
3133
this.endpoint = "/api/mail.send.json";
34+
Unirest.setDefaultHeader("User-Agent", "sendgrid/" + VERSION + ";java");
3235
}
3336

3437
public SendGrid setUrl(String url) {

0 commit comments

Comments
 (0)