#mocking #proxy #response #ca #api #set

mock_proxy

A simple way to mock out API's if you can set a proxy

15 releases

0.1.4-alpha.1 Jul 28, 2021
0.1.3 Jul 24, 2021

#599 in Testing

30 downloads per month

MIT license

26KB
555 lines

Mock Proxy

This library allows you to simply mock out an API (if you can override ssl settings and proxy settings).


lib.rs:

This library was built to help test systems that use libraries which don't provide any testing utilities themselves. It works by overriding the proxy and root ca attributes and intercepting proxy requests, then returning mock responses defined by the user

The following shows how to setup reqwest to send requests to a Proxy instance: simple_test

Dependencies

~4–13MB
~203K SLoC