面试官:没搞懂接口测试这些点,哪里来的自信投简历?
1,目前市面上流行的接口大多有哪几种协议的接口? 答:http,https,dubbo,rpc等即可。 2,接口的请求方式有哪几种? 答:get,post,put,delete,head,Trace,opions等,大多以get和post请求为主 3、get和post区别是什么? 答:POST和GET都是向服务器提交数据,并且都会从服务器获取数据。 区别: (1)传送方式:get通过地址栏传输,post通过报文传输,故而post更相对来说私密性一点 (2)传送长度:get参数有长度限制(受限于url长度),而post无限制 (3)get请求参数会被完整保留在浏览历史记录里,而post中的参数不会被保留 (4)get方式大多用作查询接口,获取响应数据;而post方式更多做数据添加、修改或删除等操作 4,post请求的请求类型有哪几种? [if !supportLists]· [endif] application/json json字符串 [if !supportLists]· [endif] [if !supportLists]· [endif] application/x-www-from-urlencoded 表单传递 [if !supportLists]· [endif] [if !supportLists]· [endif] multipart/form-data