http请求

请求方式:

 

请求体的内容类型(Content-Type:application/json):

  • application/x-www-form-urlencoded 

  • multipart/form-data

  • application/xml

  • application/json

    {

      “name”:“zhangsan”,

      “sex”:“男”,

      “age”:18

    }

 


 

认证(Authentication: Basic syndra=)

  • 基本认证。HTTP Basic Auth是一种广泛使用的协议,用于简单的用户名/密码验证。支持两种格式的Authorization标头来使用Basic Auth。
    GET https://httpbin.org//basic-auth/user/passwd HTTP/1.1
    Authorization: Basic dXNlcjpwYXNzd2Q=

    等价
    GET https://httpbin.org//basic-auth/user/passwd HTTP/1.1
    Authorization: Basic user passwd
     
  • 摘要认证。HTTP Digest Auth也是一种用户名/密码认证协议,旨在比Basic Auth稍微安全一些。
    GET https://httpbin.org/digest-auth/auth/user/passwd
    Authorization: Digest user passwd
  • SSL客户端证书在使用证书之前,需要在预期主机名的设置文件中设置证书路径(端口是可选的)。对于每个主机,您可以指定键certkeypfxpassphrase

 


 

啊v

 

posted @ 2019-08-03 15:28  scmath  阅读(264)  评论(0编辑  收藏  举报