精华内容
下载资源
问答
  • restClient

    2019-01-05 19:40:30
    restful http接口测试工具,解压后运行restclient-ui-3.7.1\restclient-ui-3.7.1\bin\restclient-ui.bat即可测试
  • restclient

    2017-03-15 11:16:31
    restclient,http测试工具
  • RestClient

    2017-11-24 09:55:41
    类似于PostMan接口调试工具,小巧的接口调试工具RestClient。需要java运行环境,直接双击bat文件即可打开。
  • RESTClient

    2014-07-04 17:19:45
    RESTClient 客户端,调试http接口的时候,通过这个工具可以进行get和post测试接口,目前只支持get、post
  • Restclient

    2019-03-31 16:49:00
    RestClient extends CMERestClient { String url = "http://localhost:8082/api/admin/login2" ; @Test public void object() { Map , String> a = new HashMap (); a.put( "userName", "ff" ); ...
    package com.xjj;
    
    import java.util.HashMap;
    import java.util.List;
    import java.util.Map;
    
    import org.junit.Test;
    
    import com.fasterxml.jackson.core.JsonProcessingException;
    import com.xjj.web.controller.LoginObj;
    
    import net.minidev.json.JSONObject;
    
    public class RestClient extends CMERestClient {
    
        String url = "http://localhost:8082/api/admin/login2";
    
        @Test
        public void object() {
    
            Map<String, String> a = new HashMap<>();
    
            a.put("userName", "ff");
            a.put("password", "fff");
    
            String jsr = JSONObject.toJSONString(a);
    
            LoginObj ss = processRestJson(url, jsr, LoginObj.class);
    
            System.out.println("jsonReturn is: " + objToJSONString(ss));
        }
        
        @Test
        public void object2() {
    
            Map<String, String> a = new HashMap<>();
    
            a.put("userName", "ff");
            a.put("password", "fff");
    
            String jsr = JSONObject.toJSONString(a);
    
            Object ss = processRestJsonObj(url, a, Map.class);
            Object mapList = restTemplate.postForObject(url, a, Map.class);
    
            System.out.println("jsonReturn is: " + objToJSONString(ss));
        }
        @Test
        public void jsonObject() throws JsonProcessingException {
    
            String jsonStr2 = "{\"userName\": \"fff\", \"password\": \"oooo\"}";
    
            JSONObject ss2 = processRestJson2(url, jsonStr2);
            
            Map<String, String> a = new HashMap<>();
    
            a.put("userName", "ff");
            a.put("password", "fff");
    
            String jsr = JSONObject.toJSONString(a);
    
            Object ss = restTemplate.postForObject(url, ss2, Map.class);
            System.out.println("jsonReturn is: " + objToJSONString(ss2));
        }
    
        // @Test
        public void list() throws Exception {
    
            String url = "http://localhost:8082/api/admin/login3";
    
            String jsonStr2 = "{\"userName\": \"fff\", \"password\": \"oooo\"}";
    
            List<LoginObj> r = processRestJsonList(url, jsonStr2, LoginObj.class);
    
            System.out.println("jsonReturn is: " + objToJSONString(r));
        }
    
        @Test
        public void listMap() throws Exception {
    
            String url = "http://localhost:8082/api/admin/login3";
    
            String jsonStr2 = "{\"userName\": \"fff\", \"password\": \"oooo\"}";
    
            List<HashMap> r = processRestJsonList(url, jsonStr2, HashMap.class);
    
            System.out.println("jsonReturn is: " + objToJSONString(r));
        }
    
        @Test
        public void listJSON() throws Exception {
    
            String url = "http://localhost:8082/api/admin/login3";
    
            JSONObject result = new JSONObject();
            result.put("userName", "HT");
            result.put("password", "30");
    
            List<JSONObject> r = processRestJsonList(url, result.toJSONString(), JSONObject.class);
    
            System.out.println("jsonReturn is: " + objToJSONString(r));
        }
    
    }

     

    转载于:https://www.cnblogs.com/wblade/p/10632002.html

    展开全文
  • RestClient-源码

    2021-03-31 23:52:24
    RestClient
  • restclient-3.5

    2017-08-24 15:11:14
    restclient
  • restclient用法

    2018-12-01 17:20:48
    介绍restclient测试API的详细用法,以及相关的注意事项。
  • restclient java

    2018-03-17 19:27:41
    Wisdom RESTClient https://github.com/Wisdom-Projects/rest-client

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 2,829
精华内容 1,131
关键字:

restclient