You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -821,8 +818,8 @@ The <img src="https://raw.githubusercontent.com/xnbox/DeepfakeHTTP/main/img/favi
821
818
<br>
822
819
<strong>⚡️ Hacks and Tips:</strong><br>
823
820
<ul>
824
-
<li>Serve any media type by using <code>X-Body-Type: text/uri-list</code> and appropriate <code>Content-Type</code>response headers.</li>
825
-
<li>With <code>X-Body-Type: text/uri-list</code> response header you can use also <code>http://</code>, <code>https://</code>and <code>file://</code> URLs.</li>
821
+
<li>Serve any media type by using <code>X-Content-Source</code>response header.</li>
822
+
<li>With <code>X-Content-Source</code></code> response header you can use also <code>http://</code>, <code>https://</code>, <code>file://</code>, and <code>data://</code> URLs.</li>
826
823
<li>Don't miss a single carriage return between headers and body!</li>
827
824
</ul>
828
825
<strong>💡 See Also:</strong>
@@ -844,9 +841,7 @@ GET /Albert_Einstein.jpeg HTTP/1.1
<li>Serve any media type by using <code>X-Body-Type: text/uri-list</code> and appropriate <code>Content-Type</code>response headers.</li>
962
-
<li>With <code>X-Body-Type: text/uri-list</code> response header you can use also <code>http://</code>, <code>https://</code>and <code>file://</code> URLs.</li>
956
+
<li>Serve any media type by using <code>X-Content-Source</code>response header.</li>
957
+
<li>With <code>X-Content-Source</code></code> response header you can use also <code>http://</code>, <code>https://</code>, <code>file://</code>, and <code>data://</code> URLs.</li>
<li>Parameters are always treated as strings.</li>
1165
-
<li>If response body content is a plain character data you don't need <code>X-Body-Type</code> header.</li>
1166
-
<li>Serve any media type by using <code>X-Body-Type: text/uri-list</code> and appropriate <code>Content-Type</code>response headers.</li>
1167
-
<li>With <code>X-Body-Type: text/uri-list</code> response header you can use also <code>http://</code>, <code>https://</code> and <code>file://</code> URLs.</li>
1160
+
<li>Serve any media type by using <code>X-Content-Source</code> response header.</li>
1161
+
<li>With <code>X-Content-Source</code></code> response header you can use also <code>http://</code>, <code>https://</code>, <code>file://</code>, and <code>data://</code> URLs.</li>
<atitle="Powered by Tommy"href="https://github.com/xnbox/tommy"><imgsrc="https://img.shields.io/badge/powered_by-Tommy-blueviolet?style=flat-square"></a>
7
7
8
8
<palign="center">
@@ -18,7 +18,7 @@ Your 100% static dynamic backend</h1>
18
18
<td>
19
19
<h3>What are people using it for?</h3>
20
20
<ul>
21
-
<li>Creating the product POC or demo before even starting out with the backend</li>
21
+
<li>Creating the product PoC or demo before even starting out with the backend</li>
22
22
<li>REST, GraphQL, and other APIs mocking and testing</li>
23
23
<li>Hiding critical enterprise infrastructure behind a simple static facade</li>
24
24
<li>Hacking and fine-tuning HTTP communications on both server and client sides</li>
@@ -75,35 +75,38 @@ For more examples, see the <a href="Cheatsheet.md">cheatsheet</a>.
75
75
```
76
76
java -jar df.jar [OPTIONS] [FLAGS] [COMMANDS]
77
77
78
-
OPTIONS:
79
-
--port <number> HTTP TCP port number, default: 8080
80
-
--port-ssl <number> HTTPS TCP port number, default: 8443
81
-
--dump <file|url>... dump text file(s) and/or OpenAPI json/yaml file(s)
82
-
--data <file|url>... json/yaml/csv data file(s) to populate templates
83
-
--openapi-path <path> serve OpenAPI client at specified context path
84
-
--openapi-title <text> provide custom OpenAPI spec title
85
-
--collect <file> collect live request/response to file
86
-
--format <json|yaml> output format for --print-* commands, default: json
87
-
--status <number> status code for non-matching requests, default: 400
88
-
89
-
FLAGS:
90
-
--no-log disable request/response console logging
91
-
--no-cors disable CORS headers
92
-
--no-etag disable 'ETag' header
93
-
--no-powered-by disable 'X-Powered-By' header
94
-
--no-watch disable watch files for changes
95
-
--no-color disable ANSI color output for --print-* commands
96
-
--no-pretty disable prettyprint for --print-* commands
97
-
--no-template disable template processing
98
-
--no-wildcard disable wildcard processing
99
-
--strict-json enable strict JSON comparison
100
-
--redirect enable redirect HTTP to HTTPS
101
-
102
-
COMMANDS:
103
-
--help print help message
104
-
--print-info print dump files statistics to stdout as json/yaml
105
-
--print-requests print dump requests to stdout as json/yaml
106
-
--print-openapi print OpenAPI specification to stdout as json/yaml
78
+
OPTIONS:
79
+
--port <number> HTTP TCP port number, default: 8080
80
+
--port-ssl <number> HTTPS TCP port number, default: 8443
81
+
--dump <file|url>... dump text file(s) and/or OpenAPI json/yaml file(s)
82
+
--data <file|url>... json/yaml/csv data file(s) to populate templates
83
+
--openapi-path <path> serve OpenAPI client at specified context path
84
+
--openapi-title <text> provide custom OpenAPI spec title
85
+
--collect <file> collect live request/response to file
86
+
--format <json|yaml> output format for --print-* commands, default: json
87
+
--status <number> status code for non-matching requests, default: 400
88
+
--max-log-body <number> max body bytes in console log, default: unlimited
89
+
90
+
FLAGS:
91
+
--no-log disable request/response console logging
92
+
--no-log-headers disable request/response headers in console logging
93
+
--no-log-body disable request/response body in console logging
94
+
--no-cors disable CORS headers
95
+
--no-etag disable 'ETag' header
96
+
--no-powered-by disable 'X-Powered-By' header
97
+
--no-watch disable watch files for changes
98
+
--no-color disable ANSI color output for --print-* commands
99
+
--no-pretty disable prettyprint for --print-* commands
100
+
--no-template disable template processing
101
+
--no-wildcard disable wildcard processing
102
+
--strict-json enable strict JSON comparison
103
+
--redirect enable redirect HTTP to HTTPS
104
+
105
+
COMMANDS:
106
+
--help print help message
107
+
--print-info print dump files statistics to stdout as json/yaml
108
+
--print-requests print dump requests to stdout as json/yaml
109
+
--print-openapi print OpenAPI specification to stdout as json/yaml
<p>Tells the server what the content type (media type) of the body content actually is. Value of this header has same rules as value of standard HTTP <code>Content-Type</code> header.</p>
304
-
<p>This header is useful when you want to use binary data or script as a response body.</p>
305
-
<i>Examples:</i>
306
-
<br><br>
307
-
308
-
A response body is a character data (default).<br>
If the URL provides its own content type and there is no <code>Content-Type</code> header in the dump, the original <code>Content-Type</code> header received from the URL will be sent along with other response headers.
334
+
</p>
335
+
<p>
336
+
This header is useful when you want to send content hosted on a remote server or just send binary data as a response body.
337
+
</p>
338
+
<i>Examples:</i>
339
+
<br><br>
319
340
320
341
Get a response body from a remote server.<br>
321
-
Body type is <code>text/uri-list</code> (RFC 2483)
0 commit comments