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
Copy file name to clipboardExpand all lines: README.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
8
8
**This project is currently in progress, feel free to [contribute](https://github.com/Simonwep/java-express/graphs/contributors) / [report](https://github.com/Simonwep/java-express/issues) issues! :)**
9
9
10
-
**[0.0.7-alpha](https://github.com/Simonwep/java-express/releases/tag/0.0.7) is ready, check it out!**
10
+
**[0.0.8-alpha](https://github.com/Simonwep/java-express/releases/tag/0.0.8) is ready, check it out!**
11
11
12
12
```java
13
13
Express app =newExpress();
@@ -242,6 +242,7 @@ res.setContentType(String type); // Set the content type
242
242
res.isClosed(); // Check if the response is already closed
243
243
res.getHeader(String key); // Get the value from an header field via key
244
244
res.setHeader(String key, String val); // Add an specific response header
245
+
res.sendAttachment(Path file) // Sends an file as attachment
245
246
res.send(String str); // Send an string as response
246
247
res.send(Path path); // Send an file as response
247
248
res.send(); // Send empty response
@@ -277,6 +278,11 @@ req.getCookies(); // Returns all cookies
277
278
req.getIp(); // Returns the client IP-Address
278
279
req.getUserAgent(); // Returns the client user agent
279
280
req.getURI(); // Returns the request URI
281
+
req.isFresh(); // Returns true if the connection is fresh, false otherwise (see code inline-doc)
282
+
req.isStale(); // Returns the opposite of req.fresh;
283
+
req.isSecure(); // Returns true when the connection is over HTTPS, false otherwise
284
+
req.isXHR(); // Returns true if the 'X-Requested-With' header field is 'XMLHttpRequest'
285
+
req.getProtocol(); // Returns the connection protocol
280
286
req.getAuthorization(); // Returns the request authorization
281
287
req.hasAuthorization(); // Check if the request has an authorization
282
288
req.pipe(OutputStream stream, int buffersize); // Pipe the request body to an outputstream
0 commit comments