1.HttpURLConnection发送url请求 public class JavaRequest { private static final String BASE_URL = "http://localhost:8080/dsdemo/"; public static String userToken = null; public static String problemName = null; public static String sendPost(String su…
在http/1.1 协议中,定义了8种发送http请求的方法 get post options head put delete trace connect patch. 根据http协议的设计初衷,不同的方法对资源有不同的操作方式, put :增 delete:删 post:改 get:查 最常用的的是get 和 post (实际上get 和 post 都能办到增删改查) 要想使哟过get 和 post 就必须了解一些概念, 1.参数:比如账号和密码的传递. get 和 post 区别…