File tree Expand file tree Collapse file tree 2 files changed +1
-12
lines changed
src/main/java/graphql/servlet Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change 11package graphql .servlet ;
22
3- import java .util .function .BiConsumer ;
43import javax .servlet .http .HttpServletRequest ;
54import javax .servlet .http .HttpServletResponse ;
65
7- interface HttpRequestHandler extends BiConsumer < HttpServletRequest , HttpServletResponse > {
6+ interface HttpRequestHandler {
87
98 String APPLICATION_JSON_UTF8 = "application/json;charset=UTF-8" ;
109 String APPLICATION_EVENT_STREAM_UTF8 = "text/event-stream;charset=UTF-8" ;
1110 String APPLICATION_GRAPHQL = "application/graphql" ;
1211 int STATUS_OK = 200 ;
1312 int STATUS_BAD_REQUEST = 400 ;
1413
15- @ Override
16- default void accept (HttpServletRequest request , HttpServletResponse response ) {
17- try {
18- handle (request , response );
19- } catch (Exception e ) {
20- throw new RuntimeException (e );
21- }
22- }
23-
2414 void handle (HttpServletRequest request , HttpServletResponse response ) throws Exception ;
2515
2616}
Original file line number Diff line number Diff line change 1010import graphql .servlet .input .GraphQLBatchedInvocationInput ;
1111import graphql .servlet .input .GraphQLInvocationInput ;
1212import graphql .servlet .input .GraphQLSingleInvocationInput ;
13- import java .util .Optional ;
1413import javax .servlet .http .HttpServletRequest ;
1514import javax .servlet .http .HttpServletResponse ;
1615import lombok .extern .slf4j .Slf4j ;
You can’t perform that action at this time.
0 commit comments