Skip to content

Commit 323f2f9

Browse files
committed
remove Context.isForm added in previous commit
1 parent 5d6aa32 commit 323f2f9

3 files changed

Lines changed: 0 additions & 22 deletions

File tree

jooby/src/main/java/io/jooby/Context.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -600,13 +600,6 @@ public interface Context extends Registry {
600600
*/
601601
@Nonnull Multipart multipart();
602602

603-
/**
604-
* Whether request content type is set to <code>application/x-www-form-urlencoded</code> or
605-
* <code>multipart/*</code>
606-
* @return
607-
*/
608-
boolean isForm();
609-
610603
/**
611604
* Get a multipart field that matches the given name.
612605
*

jooby/src/main/java/io/jooby/DefaultContext.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,6 @@ public interface DefaultContext extends Context {
9393
.create(this, new Cookie(getRouter().getFlashCookie()).setHttpOnly(true)));
9494
}
9595

96-
@Override default boolean isForm() {
97-
String contentType = header("Content-Type").value("");
98-
if (contentType.equalsIgnoreCase(MediaType.FORM_URLENCODED)) {
99-
return true;
100-
}
101-
if (contentType.toLowerCase().startsWith(MediaType.MULTIPART_FORMDATA)) {
102-
return true;
103-
}
104-
return false;
105-
}
106-
10796
/**
10897
* Get a flash attribute.
10998
*

jooby/src/main/java/io/jooby/ForwardingContext.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,6 @@ public ForwardingContext(@Nonnull Context context) {
201201
return ctx.getRequestType(defaults);
202202
}
203203

204-
@Override public boolean isForm() {
205-
return ctx.isForm();
206-
}
207-
208204
@Override public long getRequestLength() {
209205
return ctx.getRequestLength();
210206
}

0 commit comments

Comments
 (0)