HTTP API 测试框架 dogpatch

码农软件 · 软件分类 · 测试工具 · 2019-11-22 18:41:27

软件介绍

dogpatch 是一个用 PHP 和 curl 开发的 HTTP API 测试框架。支持 SSL、基本认证、自定义请求头、重定向和大多数 HTTP 方法。

示例代码:

$dogpatch = new Dogpatch();

$dogpatch->get("https://api.github.com")
         ->assertStatusCode(200)
         ->assertHeadersExist(array(
            "X-GitHub-Request-Id",
            "ETag"
         ))
         ->assertHeaders(array(
            "Server" => "GitHub.com"
         ))
         ->assertBody(IS_VALID_JSON)
         ->close();

$dogpatch->get("https://freegeoip.net/json/8.8.8.8")
         ->assertStatusCode(200)
         ->assertHeadersExist(array(
            "Content-Length"
         ))
         ->assertHeaders(array(
            "Access-Control-Allow-Origin" => "*"
         ))
         ->assertBodyJsonFile(dirname(__DIR__) . "/examples/json/freegeoip.net.json")
         ->close();

本文地址:https://codercto.com/soft/d/19567.html

Tango with Django

Tango with Django

David Maxwell、Leif Azzopardi / Leanpub / 2016-11-12 / USD 19.00

Tango with Django is a beginner's guide to web development using the Python programming language and the popular Django web framework. The book is written in a clear and friendly style teaching you th......一起来看看 《Tango with Django》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具