File tree Expand file tree Collapse file tree
src/main/java/io/github/devopsws/demo/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,6 +72,17 @@ items:
7272 expect :
7373 body : |
7474 {"name":"rick","age":18}
75+ - name : big
76+ request :
77+ api : /big
78+ query :
79+ size : " 1"
80+ header :
81+ Authorization : " {{ .param.auth }}"
82+ Content-Type : application/json
83+ expect :
84+ body : |
85+ {"message":"m","data":null}
7586
7687 # # Cookies
7788- name : no-cookie
Original file line number Diff line number Diff line change @@ -38,4 +38,19 @@ public Message base64(@RequestBody Message message) {
3838 public Object echo (@ RequestBody Object payload ) {
3939 return payload ;
4040 }
41+
42+ @ GetMapping ("/big" )
43+ public Message big (@ RequestParam (required = true ) int size ) {
44+ Message msg = new Message ();
45+ StringBuffer buf = new StringBuffer ();
46+ if (size < 0 ) {
47+ buf .append ("size needs to be positive" );
48+ } else {
49+ for (int i = 0 ; i < size ; i ++) {
50+ buf .append ("m" );
51+ }
52+ }
53+ msg .setMessage (buf .toString ());
54+ return msg ;
55+ }
4156}
You can’t perform that action at this time.
0 commit comments