[开发工具]--一个可以测试所有网络请求的网站

----网站地址------ https://httpbin.org/

DESCRIPTION
Testing an HTTP Library can become difficult sometimes.RequestBin is fantastic 
for testing POST requests, but doesn't let you control the response.This exists 
to cover all kinds of HTTP scenarios. Additional endpoints are being considered.

使用条件:

1 有一定的网络基础知识,
2 能够明白网址,请求等基础术语
3 能够自己拼接网络地址
4 明白网址结构构成
5 有至少一种编程语言基础

使用情景:
1 当你需要急需一个网址进行get/post等请求方法的测试的时候
2 获取本机原始ip
3 获取UUID4
4 获取本次网络请求的user-agent

使用方法: https://httpbin.org/ �按照网站的内容后边直接拼接对应的路径

部分内容截图

[开发工具]--一个可以测试所有网络请求的网站_第1张图片
网站内容部分截图.png

例如:

1 GET请求:

    1.1 访问地址:https://httpbin.org/get
    1.2 请求方法: GET
    1.3 返回内容:
          {
          "args": {},
          "headers": {
              "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
              "Accept-Encoding": "gzip, deflate, br",
              "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
              "Connection": "close",
              "Cookie": "_gauges_unique_year=1; _gauges_unique=1; _gauges_unique_hour=1; _gauges_unique_day=1; _gauges_unique_month=1",
              "Host": "httpbin.org",
              "Upgrade-Insecure-Requests": "1",
              "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36"
          },
          "origin": "111.206.175.44",
          "url": "https://httpbin.org/get"
      }

2 POST请求

   2.1 访问地址:https://httpbin.org/post
   2.2 请求方法: POST

当然还有很多请求,详见附录:

  • /
    This page.

  • /ip

    Returns Origin IP.

  • /uuid

    Returns UUID4.

  • /user-agent

    Returns user-agent.

  • /headers

    Returns header dict.

  • /get

    Returns GET data.

  • /post

    Returns POST data.

  • /patch

    Returns PATCH data.

  • /put

    Returns PUT data.

  • /delete

    Returns DELETE data

  • /anything

    Returns request data, including method used.

  • /anything/:anything

    Returns request data, including the URL.

  • /encoding/utf8

    Returns page containing UTF-8 data.

  • /gzip

    Returns gzip-encoded data.

  • /deflate

    Returns deflate-encoded data.

  • /brotli

    Returns brotli-encoded data.

  • /status/:code

    Returns given HTTP Status code.

  • /response-headers?key=val

    Returns given response headers.

  • /redirect/:n

    302 Redirects

    n

    times.

  • /redirect-to?url=foo

    302 Redirects to the

    foo

    URL.

  • /redirect-to?url=foo&status_code=307

    307 Redirects to the

    foo

    URL.

  • /relative-redirect/:n

    302 Relative redirects

    n

    times.

  • /absolute-redirect/:n

    302 Absolute redirects

    n

    times.

  • /cookies

    Returns cookie data.

  • /cookies/set?name=value

    Sets one or more simple cookies.

  • /cookies/delete?name

    Deletes one or more simple cookies.

  • /basic-auth/:user/:passwd

    Challenges HTTPBasic Auth.

  • /hidden-basic-auth/:user/:passwd

    404'd BasicAuth.

  • /digest-auth/:qop/:user/:passwd/:algorithm

    Challenges HTTP Digest Auth.

  • /digest-auth/:qop/:user/:passwd

    Challenges HTTP Digest Auth.

  • /stream/:n

    Streams

    min(n, 100)

    lines.

  • /delay/:n

    Delays responding for

    min(n, 10)

    seconds.

  • /drip?numbytes=n&duration=s&delay=s&code=code

    Drips data over a duration after an optional initial delay, then (optionally) returns with the given status code.

  • /range/1024?duration=s&chunk_size=code

    Streams

    n

    bytes, and allows specifying a

    Range

    header to select a subset of the data. Accepts a

    chunk_size

    and request

    durationparameter.

  • /html

    Renders an HTML Page.

  • /robots.txt

    Returns some robots.txt rules.

  • /deny

    Denied by robots.txt file.

  • /cache

    Returns 200 unless an If-Modified-Since or If-None-Match header is provided, when it returns a 304.

  • /etag/:etag

    Assumes the resource has the given etag and responds to If-None-Match header with a 200 or 304 and If-Match with a 200 or 412 as appropriate.

  • /cache/:n

    Sets a Cache-Control header for

    n

    seconds.

  • /bytes/:n

    Generates

    n

    random bytes of binary data, accepts optional

    seed

    integer parameter.

  • /stream-bytes/:n

    Streams

    n

    random bytes of binary data in chunked encoding, accepts optional

    seed

    and

    chunk_sizeinteger parameters.

  • /links/:n

    Returns page containing

    n

    HTML links.

  • /image

    Returns page containing an image based on sent Accept header.

  • /image/png

    Returns a PNG image.

  • /image/jpeg

    Returns a JPEG image.

  • /image/webp

    Returns a WEBP image.

  • /image/svg

    Returns a SVG image.

  • /forms/post

    HTML form that submits to

    /post

  • /xml

    Returns some XML

你可能感兴趣的:([开发工具]--一个可以测试所有网络请求的网站)