https://github.com/xnbox/DeepfakeHTTP Skip to content Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Issues - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} xnbox / DeepfakeHTTP * Notifications * Star 1 * Fork 0 DeepfakeHTTP is an HTTP server that uses HTTP dumps as a source for responses. xnbox.github.io/deepfakehttp#readme MIT License 1 star 0 forks Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Security * Insights More * Code * Issues * Pull requests * Actions * Security * Insights main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 1 tag Code * Clone HTTPS GitHub CLI [https://github.com/x] Use Git or checkout with SVN using the web URL. [gh repo clone xnbox/] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @xnbox xnbox Features list updated ... 7705c17 Aug 21, 2021 Features list updated 7705c17 Git stats * 26 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time META-INF Initial commit Aug 21, 2021 WEB-INF Initial commit Aug 21, 2021 lib-compile-time Initial commit Aug 21, 2021 lib Initial commit Aug 21, 2021 src Initial commit Aug 21, 2021 .classpath Initial commit Aug 21, 2021 .gitignore Initial commit Aug 21, 2021 .project Initial commit Aug 21, 2021 LICENSE Initial commit Aug 21, 2021 README.md Features list updated Aug 21, 2021 THIRD-PARTY.txt Initial commit Aug 21, 2021 build-DeepfakeHTTP.xml Initial commit Aug 21, 2021 image.png Initial commit Aug 21, 2021 View code [ ] DeepfakeHTTP - Your 100% static dynamic backend How it works Try DeepfakeHTTP Dump example Features Prerequisites Command Line Interface (CLI) Optional response headers (will not be sent to clients) Download License APPENDIX Dump examples Example 1. Example 2. Example 3. README.md DeepfakeHTTP - Your 100% static dynamic backend License MIT Version 1.0.2 Powered by Tommy DeepfakeHTTP is an HTTP server that uses HTTP dumps as a source for responses. Use it for: [image] * Creating the product POC or demo before even starting out with the backend * REST, GraphQL, and other APIs prototyping and testing * Hiding critical enterprise infrastructure behind simple static facade * Hacking and fine-tuning HTTP communications on both server and client sides How it works 1. Got client request 2. Search dump entries (request-response pairs) for appropriate entry by matching all specified request entry parts: method, path, headers, body 3. If entry is found, the server sends corresponded response to the client 4. If entry is not found, server search dump entries for response with status 400 (Bad request). 5. If found, send it to the client 6. If not found, sends status 400 with no body. That's all. Try DeepfakeHTTP 1. Copy the content of the dump example to the file MyDump.txt 2. Start the DeepfakeHTTP server from command line: java -jar df.jar MyDump.txt 3. Use a browser to check whether DeepfakeHTTP is running on URL http://localhost:8080/form.html Dump example # Comments are welcome! :) # Fake HTML file :) GET /form.html HTTP/1.1 HTTP/1.1 200 OK
# Fake PHP file :) POST /add_user.php HTTP/1.1 Content-Type: application/x-www-form-urlencoded HTTP/1.1 200 OK Content-Type: text/html X-Body-Type: text/template