fix: mess code in Microsoft login page. Closes #981.
This commit is contained in:
@@ -57,10 +57,6 @@ public abstract class HttpRequest {
|
||||
return header("Authorization", token);
|
||||
}
|
||||
|
||||
public HttpRequest contentType(String contentType) {
|
||||
return header("Content-Type", contentType);
|
||||
}
|
||||
|
||||
public HttpRequest header(String key, String value) {
|
||||
headers.put(key, value);
|
||||
return this;
|
||||
@@ -109,6 +105,11 @@ public abstract class HttpRequest {
|
||||
super(url, "POST");
|
||||
}
|
||||
|
||||
public HttpPostRequest contentType(String contentType) {
|
||||
headers.put("Content-Type", contentType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public HttpPostRequest json(Object payload) throws JsonParseException {
|
||||
return string(payload instanceof String ? (String) payload : GSON.toJson(payload), "application/json");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user