Skip to content

Commit b9ef8c6

Browse files
committed
Fixed missing content-type problem
1 parent fb023c7 commit b9ef8c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/javawebstack/httpclient/HTTPRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ public <T> T object(Class<T> type){
133133

134134
public GraphElement graph(){
135135
String contentType = header("Content-Type");
136+
if(contentType == null)
137+
contentType = "application/json";
136138
switch (contentType){
137139
case "application/x-www-form-urlencoded":
138140
GraphElement.fromFormData(string());

0 commit comments

Comments
 (0)