类 HttpModule

java.lang.Object
org.ssssssss.magicapi.modules.http.HttpModule

@MagicModule("http") public class HttpModule extends Object
http 模块
从以下版本开始:
1.1.0
作者:
mxd
  • 字段详细资料

    • template

      private final org.springframework.web.client.RestTemplate template
    • httpHeaders

      private final org.springframework.http.HttpHeaders httpHeaders
    • responseType

      private Class<?> responseType
    • params

      private final org.springframework.util.MultiValueMap<String,Object> params
    • data

      private final org.springframework.util.MultiValueMap<String,Object> data
    • variables

      private final Map<String,?> variables
    • url

      private String url
    • method

      private org.springframework.http.HttpMethod method
    • entity

      private org.springframework.http.HttpEntity<Object> entity
    • requestBody

      private Object requestBody
  • 构造器详细资料

    • HttpModule

      public HttpModule(org.springframework.web.client.RestTemplate template)
    • HttpModule

      public HttpModule(org.springframework.web.client.RestTemplate template, String url)
  • 方法详细资料

    • connect

      @Comment("\u521b\u5efa\u8fde\u63a5") public HttpModule connect(@Comment(name="url",value="\u76ee\u6807URL") String url)
    • param

      @Comment("\u8bbe\u7f6eURL\u53c2\u6570") public HttpModule param(@Comment(name="key",value="\u53c2\u6570\u540d") String key, @Comment(name="values",value="\u53c2\u6570\u503c") Object... values)
    • param

      @Comment("\u6279\u91cf\u8bbe\u7f6eURL\u53c2\u6570") public HttpModule param(@Comment(name="values",value="\u53c2\u6570\u503c") Map<String,Object> values)
    • data

      @Comment("\u8bbe\u7f6eform\u53c2\u6570") public HttpModule data(@Comment(name="key",value="\u53c2\u6570\u540d") String key, @Comment(name="values",value="\u53c2\u6570\u503c") Object... values)
    • data

      @Comment("\u6279\u91cf\u8bbe\u7f6eform\u53c2\u6570") public HttpModule data(@Comment(name="values",value="\u53c2\u6570\u503c") Map<String,Object> values)
    • header

      @Comment("\u8bbe\u7f6eheader") public HttpModule header(@Comment(name="key",value="header\u540d") String key, @Comment(name="value",value="header\u503c") String value)
    • header

      @Comment("\u6279\u91cf\u8bbe\u7f6eheader") public HttpModule header(@Comment(name="values",value="header\u503c") Map<String,Object> values)
    • method

      @Comment("\u8bbe\u7f6e\u8bf7\u6c42\u65b9\u6cd5\uff0c\u9ed8\u8ba4GET") public HttpModule method(@Comment(name="method",value="\u8bf7\u6c42\u65b9\u6cd5") org.springframework.http.HttpMethod method)
    • body

      @Comment("\u8bbe\u7f6e`RequestBody`") public HttpModule body(@Comment(name="requestBody",value="`RequestBody`") Object requestBody)
    • entity

      @Comment("\u81ea\u5b9a\u4e49`HttpEntity`") public HttpModule entity(@Comment(name="entity",value="`HttpEntity`") org.springframework.http.HttpEntity<Object> entity)
    • contentType

      @Comment("\u8bbe\u7f6e`ContentType`") public HttpModule contentType(@Comment(name="contentType",value="Content-Type\u503c") String contentType)
    • contentType

      @Comment("\u8bbe\u7f6e`ContentType`") public HttpModule contentType(@Comment(name="mediaType",value="Content-Type\u503c") org.springframework.http.MediaType mediaType)
    • expectBytes

      @Comment("\u8bbe\u7f6e\u8fd4\u56de\u503c\u4e3a`byte[]`") public HttpModule expectBytes()
    • post

      @Comment("\u53d1\u9001`POST`\u8bf7\u6c42") public org.springframework.http.ResponseEntity<?> post()
    • get

      @Comment("\u53d1\u9001`GET`\u8bf7\u6c42") public org.springframework.http.ResponseEntity<?> get()
    • put

      @Comment("\u53d1\u9001`PUT`\u8bf7\u6c42") public org.springframework.http.ResponseEntity<?> put()
    • delete

      @Comment("\u53d1\u9001`DELETE`\u8bf7\u6c42") public org.springframework.http.ResponseEntity<?> delete()
    • head

      @Comment("\u53d1\u9001`HEAD`\u8bf7\u6c42") public org.springframework.http.ResponseEntity<?> head()
    • options

      @Comment("\u53d1\u9001`OPTIONS`\u8bf7\u6c42") public org.springframework.http.ResponseEntity<?> options()
    • trace

      @Comment("\u53d1\u9001`TRACE`\u8bf7\u6c42") public org.springframework.http.ResponseEntity<?> trace()
    • patch

      @Comment("\u53d1\u9001`PATCH`\u8bf7\u6c42") public org.springframework.http.ResponseEntity<?> patch()
    • execute

      @Comment("\u6267\u884c\u8bf7\u6c42") public org.springframework.http.ResponseEntity<?> execute()