Skip to content

Commit b09f438

Browse files
authored
Merge pull request #62 from aliyun/fix_callback_sample
refine callback sample
2 parents b880b6f + d26e93b commit b09f438

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/samples/CallbackSample.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ public static void main(String[] args) throws IOException {
3838
Callback callback = new Callback();
3939
callback.setCallbackUrl(callbackUrl);
4040
callback.setCallbackHost("oss-cn-hangzhou.aliyuncs.com");
41-
callback.setCallbackBody("{\\\"mimeType\\\":${mimeType},\\\"size\\\":${size}}");
41+
callback.setCallbackBody("{\\\"bucket\\\":${bucket},\\\"object\\\":${object},"
42+
+ "\\\"mimeType\\\":${mimeType},\\\"size\\\":${size},"
43+
+ "\\\"my_var1\\\":${x:var1},\\\"my_var2\\\":${x:var2}}");
4244
callback.setCalbackBodyType(CalbackBodyType.JSON);
4345
callback.addCallbackVar("x:var1", "value1");
4446
callback.addCallbackVar("x:var2", "value2");

0 commit comments

Comments
 (0)