@Target(value=PARAMETER) @Retention(value=RUNTIME) @Documented public @interface QueryParam
@Rest("https://httpbin.org")
interface Httpbin {
@Post("/post")
JSONObject post(@QueryParam(name = "foo") String foo, @Param(name = "bar") String bar);
}
则最终访问的URL是: https://httpbin.org/post?foo=value
请求的body是: {"foo":"value","bar":"value"}
public abstract String name
Copyright © 2019. All rights reserved.