Minor refactoring
This commit is contained in:
parent
2f5002d8d7
commit
a1b83bb14a
@ -38,11 +38,11 @@ public class JPushover {
|
|||||||
private String pushoverRetry;
|
private String pushoverRetry;
|
||||||
private String pushoverExpire;
|
private String pushoverExpire;
|
||||||
private String pushoverCallback;
|
private String pushoverCallback;
|
||||||
private boolean pushoverHtml;
|
|
||||||
private Priority pushoverPriority;
|
private Priority pushoverPriority;
|
||||||
private Sound pushoverSound;
|
private Sound pushoverSound;
|
||||||
private HttpHost proxy;
|
private HttpHost proxy;
|
||||||
|
private boolean pushoverHtml;
|
||||||
|
|
||||||
public JPushover() {
|
public JPushover() {
|
||||||
this.withSound(Sound.PUSHOVER);
|
this.withSound(Sound.PUSHOVER);
|
||||||
this.withPriority(Priority.NORMAL);
|
this.withPriority(Priority.NORMAL);
|
||||||
@ -228,7 +228,7 @@ public class JPushover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Uses the given proxy for http communication
|
* Uses the given proxy for HTTP requests
|
||||||
*
|
*
|
||||||
* @param proxy The host that should be used as Proxy
|
* @param proxy The host that should be used as Proxy
|
||||||
* @return JPushover instance
|
* @return JPushover instance
|
||||||
@ -261,9 +261,9 @@ public class JPushover {
|
|||||||
boolean valid = false;
|
boolean valid = false;
|
||||||
try {
|
try {
|
||||||
final Request request = Request.Post(Constants.VALIDATION_URL.toString());
|
final Request request = Request.Post(Constants.VALIDATION_URL.toString());
|
||||||
|
if (proxy != null) {
|
||||||
if (proxy!=null)
|
request.viaProxy(proxy);
|
||||||
request.viaProxy(proxy);
|
}
|
||||||
|
|
||||||
final HttpResponse httpResponse = request
|
final HttpResponse httpResponse = request
|
||||||
.bodyForm(params, Consts.UTF_8)
|
.bodyForm(params, Consts.UTF_8)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user