ICode9

精准搜索请尝试: 精确搜索
  • 【转】YApi结合swag管理和生成go项目restful API文档2022-08-27 18:02:17

      原文:https://blog.csdn.net/tuobicui6522/article/details/102980653   swag命令安装:   go install github.com/swaggo/swag/cmd/swag@latest   swag命令对应的github库:https://github.com/swaggo/swag            用yapi在线调用接口测试     aaa   -----------

  • 使用hutool工具类远程调用http接口返回结果为空2022-04-12 14:34:37

    使用hutool工具类远程调用http接口时返回结果为空? 直接使用HttpUtil.post( )方法访问会发现返回结果为空,debug排查发现是重定向问题 HttpUtil.post(url,reqParam); 改用HttpRequest.post( )方法并设置重定向次数即可解决 HttpRequest.post(url) .header("X-lr-request-i

  • HttpUtil2022-02-08 15:02:15

    HttpUtil package com.maxiaoyun.tools; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.MalformedURLEx

  • [CocosCreator]封装XMLHttpRequest短连接2021-08-07 19:02:34

    import SysLog from "./SysLog"; import PublicUtil from "./PublicUtil"; import ServerConfig from "../common/ServerConfig"; import UserData from "../data/UserData"; class HttpUtil { private static instance: HttpUt

  • go swag常用注释2021-07-16 14:58:29

    生成在线文档校验接口时,主要使用这个@Param这种注解写对。个人理解,这些注释不是对代码功能的约束,而是对生成的前端测试ui中前端代码的约束。或者说对文档的约束 param的格式: param name,param type,data type,is mandatory?,comment attribute(optional) @Param enumstring q

  • 设计模式的学习笔记(持续更新中……)2021-01-05 14:05:58

    关于设计模式的学习笔记 构建型模式工厂模式简单工厂模式工厂方法模式抽象工厂模式 单例模式饿汉式懒汉式 建造者模式原型模式 结构型模式适配器模式桥接模式组合模式透明模式安全模式 装饰模式透明装饰模式(增强功能)半透明装饰模式(新增功能) 外观模式享元模式代理模式静态代

  • HttpUtil 发送请求2020-12-13 14:33:39

    /** * 发送http请求 get方式 * * @param url * @return */public static String sendGet(String url) { String result = ""; BufferedReader in = null; try { URL realUrl = new URL(url); // 打开和URL之间的连接 URLConnection connection = re

  • CookieUtil、EncryptUtil(各种加密算法)、HttpUtil2020-03-05 13:04:00

    1、CookieUtil ublic class CookieUtil { // 默认缓存时间,单位/秒, 2H private static final int COOKIE_MAX_AGE = 60 * 60 * 2; // 保存路径,根路径 private static final String COOKIE_PATH = "/"; /** * 保存 * * @param response

  • 基于HttpClient的工具类HttpUtil2019-10-10 14:54:50

    <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.5.6</version></dependency>public class HttpUtil { public static String doGet(String url) th

  • Hultool之HttpUtil用法笔记2019-08-30 15:06:47

    // 传递String数组String strArr = new String[2];strArr[0] = "t1";strArr[1] = "t2";final String testurl = Global.getConfig("ipport") + "/testurl";final HashMap<Object, Object> map = Maps.newHashMap();map.put("s

  • Hutool工具类之HttpUtil使用Https2019-05-04 17:40:25

    关于Hutool工具类之HttpUtil如何使用可以参考官方文档Hutool之HttpUtil 其实使用Http和Https使用的方式是一样的。 建议大家可以看看HttpUtil的源码,感觉设计的挺不错的。 导入Maven依赖 <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <v

  • AsyncTask post方式 单例 网络判断2019-05-01 12:55:23

    public class HttpUtil { private static HttpUtil util; private HttpUtil(){}; public static HttpUtil getInstance(){ if (util == null){ synchronized (HttpUtil.class){ if (util == null){ util = new HttpUtil();

  • HttpUtil网络请求回调类2019-01-28 18:01:04

    public class HttpUtil { public interface HttpCallbackListener { void onFinish(String response); void onError(Exception e); } private static CountDownLatch latch = null;//异步转同步 public static void sendHttpRequest(fin

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有