diff src/luan/modules/url/LuanUrl.java @ 1753:83780735ad9c

add url put
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 04 Feb 2023 21:26:41 -0700
parents f7e2df85fc0a
children 6668513a11d7
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");