changeset 1753:83780735ad9c

add url put
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 04 Feb 2023 21:26:41 -0700
parents b4fa42c1e999
children d179810c6148
files src/luan/modules/url/LuanUrl.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/modules/url/LuanUrl.java	Wed Jan 25 12:22:09 2023 -0700
+++ b/src/luan/modules/url/LuanUrl.java	Sat Feb 04 21:26:41 2023 -0700
@@ -31,7 +31,7 @@
 
 public final class LuanUrl extends IoLuan.LuanIn {
 
-	private static enum Method { GET, POST, DELETE }
+	private static enum Method { GET, POST, DELETE, PUT }
 
 	public final URL url;
 	private Method method = Method.GET;
@@ -247,6 +247,11 @@
 			return getInputStream(httpCon,authorization);
 		}
 
+		if( method==Method.PUT ) {
+			httpCon.setRequestMethod("PUT");
+			return getInputStream(httpCon,authorization);
+		}
+
 		// POST
 
 //		httpCon.setRequestProperty("content-type","application/x-www-form-urlencoded");