This is an automated email from the ASF dual-hosted git repository.

afs pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena.git

commit de08fd3a555f14d023c7512bf8e9098381da8612
Author: Andy Seaborne <[email protected]>
AuthorDate: Sat Jul 4 16:29:31 2026 +0100

    Use enum HttpMethod
---
 .../main/java/org/apache/jena/http/HttpLib.java    |  40 +++++-
 .../apache/jena/{riot/web => http}/HttpMethod.java |  31 +++--
 .../src/main/java/org/apache/jena/http/HttpOp.java |  16 +--
 .../main/java/org/apache/jena/http/HttpRDF.java    |  18 +--
 .../src/main/java/org/apache/jena/http/Push.java   |  12 +-
 .../java/org/apache/jena/riot/web/HttpNames.java   | 151 ++++++++++++---------
 .../java/org/apache/jena/sparql/exec/http/DSP.java |  10 +-
 .../java/org/apache/jena/sparql/exec/http/GSP.java |  10 +-
 .../jena/sparql/exec/http/StoreProtocol.java       |   6 +-
 .../jena/fuseki/access/AccessCtl_AllowGET.java     |  10 +-
 .../jena/fuseki/ctl/ActionContainerItem.java       |  15 +-
 .../apache/jena/fuseki/ctl/ActionStatsText.java    |   6 +-
 .../org/apache/jena/fuseki/ctl/ActionTasks.java    |   7 +-
 .../org/apache/jena/fuseki/server/Dispatcher.java  |   7 +-
 .../apache/jena/fuseki/servlets/ActionExecLib.java |   3 +-
 .../org/apache/jena/fuseki/servlets/ActionLib.java |   4 +-
 .../jena/fuseki/servlets/ActionProcessor.java      |  48 ++++---
 .../apache/jena/fuseki/servlets/ActionREST.java    |  23 ++--
 .../jena/fuseki/servlets/NoOpActionService.java    |  13 +-
 .../apache/jena/fuseki/servlets/PatchApply.java    |   5 +-
 .../jena/fuseki/servlets/SPARQLQueryProcessor.java |   9 +-
 .../apache/jena/fuseki/servlets/SPARQL_Update.java |   7 +-
 .../servlets/prefixes/ActionPrefixesBase.java      |   8 +-
 .../jena/fuseki/validation/ValidatorBase.java      |   4 +-
 .../jena/fuseki/validation/ValidatorBaseJson.java  |   4 +-
 .../org/apache/jena/fuseki/mgt/ActionReload.java   |   4 +-
 .../jena/fuseki/main/TestCrossOriginFilter.java    |   6 +-
 .../org/apache/jena/fuseki/main/TestUpdate.java    |   1 -
 28 files changed, 273 insertions(+), 205 deletions(-)

diff --git a/jena-arq/src/main/java/org/apache/jena/http/HttpLib.java 
b/jena-arq/src/main/java/org/apache/jena/http/HttpLib.java
index 58cd087d5f..5303c7a49d 100644
--- a/jena-arq/src/main/java/org/apache/jena/http/HttpLib.java
+++ b/jena-arq/src/main/java/org/apache/jena/http/HttpLib.java
@@ -695,19 +695,49 @@ public class HttpLib {
         return httpClient.sendAsync(httpRequest, BodyHandlers.ofInputStream());
     }
 
+    /**
+     * Push data. POST, PUT, PATCH request with no response body data.
+     * @deprecated Use {@link #httpPushData(HttpClient, HttpMethod, String, 
Consumer, BodyPublisher)}
+     */
+    @Deprecated(forRemoval = true)
+    public static void httpPushData(HttpClient httpClient, 
@SuppressWarnings("removal") Push style, String url, 
Consumer<HttpRequest.Builder> modifier, BodyPublisher body) {
+        HttpResponse<InputStream> response = httpPushWithResponse(httpClient, 
style.method(), url, modifier, body);
+        handleResponseNoBody(response);
+    }
+
     /** Push data. POST, PUT, PATCH request with no response body data. */
-    public static void httpPushData(HttpClient httpClient, Push style, String 
url, Consumer<HttpRequest.Builder> modifier, BodyPublisher body) {
-        HttpResponse<InputStream> response = httpPushWithResponse(httpClient, 
style, url, modifier, body);
+    public static void httpPushData(HttpClient httpClient, HttpMethod method, 
String url, Consumer<HttpRequest.Builder> modifier, BodyPublisher body) {
+        HttpResponse<InputStream> response = httpPushWithResponse(httpClient, 
method, url, modifier, body);
         handleResponseNoBody(response);
     }
 
+    /**
+     * Push data. POST, PUT, PATCH request with no response body data.
+     * @deprecated Use {@link #httpPushWithResponse(HttpClient, HttpMethod, 
String, Consumer, BodyPublisher)}
+     */
+    @Deprecated(forRemoval = true)
+    public static HttpResponse<InputStream> httpPushWithResponse(HttpClient 
httpClient, @SuppressWarnings("removal") Push style, String url,
+                                                                 
Consumer<HttpRequest.Builder> modifier, BodyPublisher body) {
+        return httpPushWithResponse(httpClient, style.method(), url, modifier, 
body);
+
+    }
     // Worker
-    public static HttpResponse<InputStream> httpPushWithResponse(HttpClient 
httpClient, Push style, String url,
+    public static HttpResponse<InputStream> httpPushWithResponse(HttpClient 
httpClient, HttpMethod method, String url,
                                                                  
Consumer<HttpRequest.Builder> modifier, BodyPublisher body) {
+        switch(method) {
+            case POST,PUT, PATCH -> {}
+            default -> { throw HttpException.error("Method not suitable for 
push operation: "+method); }
+        }
+        return httpPushWithResponse(httpClient, method.method(), url, 
modifier, body);
+    }
+
+
+    private static HttpResponse<InputStream> httpPushWithResponse(HttpClient 
httpClient, String method, String url,
+                                                                  
Consumer<HttpRequest.Builder> modifier, BodyPublisher body) {
         URI uri = toRequestURI(url);
         HttpRequest.Builder builder = requestBuilderFor(url);
         builder.uri(uri);
-        builder.method(style.method(), body);
+        builder.method(method, body);
         if ( modifier != null )
             modifier.accept(builder);
         HttpResponse<InputStream> response = execute(httpClient, 
builder.build());
@@ -817,7 +847,7 @@ public class HttpLib {
      */
     public static boolean isFuseki(String datasetURL) {
         HttpRequest.Builder builder =
-                
HttpRequest.newBuilder().uri(toRequestURI(datasetURL)).method(HttpNames.METHOD_HEAD,
 BodyPublishers.noBody());
+                
HttpRequest.newBuilder().uri(toRequestURI(datasetURL)).method(HttpMethod.METHOD_HEAD,
 BodyPublishers.noBody());
         HttpRequest request = builder.build();
         HttpClient httpClient = HttpEnv.getHttpClient(datasetURL);
         HttpResponse<InputStream> response = execute(httpClient, request);
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/web/HttpMethod.java 
b/jena-arq/src/main/java/org/apache/jena/http/HttpMethod.java
similarity index 63%
rename from jena-arq/src/main/java/org/apache/jena/riot/web/HttpMethod.java
rename to jena-arq/src/main/java/org/apache/jena/http/HttpMethod.java
index 47b02f196f..256c106bc7 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/web/HttpMethod.java
+++ b/jena-arq/src/main/java/org/apache/jena/http/HttpMethod.java
@@ -19,25 +19,34 @@
  *   SPDX-License-Identifier: Apache-2.0
  */
 
-package org.apache.jena.riot.web;
+package org.apache.jena.http;
 
 import static org.apache.jena.atlas.lib.Lib.uppercase;
 
 public enum HttpMethod {
-    // METHOD_ only for transition/rename.
-    METHOD_DELETE("DELETE"),
-    METHOD_HEAD("HEAD"),
-    METHOD_GET("GET"),
-    METHOD_QUERY("QUERY"),
-    METHOD_OPTIONS("OPTIONS"),
-    METHOD_PATCH("PATCH"),
-    METHOD_POST("POST"),
-    METHOD_PUT("PUT"),
-    METHOD_TRACE("TRACE")
+    DELETE("DELETE"),
+    HEAD("HEAD"),
+    GET("GET"),
+    QUERY("QUERY"),
+    OPTIONS("OPTIONS"),
+    PATCH("PATCH"),
+    POST("POST"),
+    PUT("PUT"),
+    TRACE("TRACE")
     ;
 
     private final String method;
 
+    public static final String METHOD_DELETE        = "DELETE";
+    public static final String METHOD_HEAD          = "HEAD";
+    public static final String METHOD_GET           = "GET";
+    public static final String METHOD_QUERY         = "QUERY" ;
+    public static final String METHOD_OPTIONS       = "OPTIONS";
+    public static final String METHOD_PATCH         = "PATCH" ;
+    public static final String METHOD_POST          = "POST";
+    public static final String METHOD_PUT           = "PUT";
+    public static final String METHOD_TRACE         = "TRACE";
+
     private HttpMethod(String name) {
         this.method = name;
     }
diff --git a/jena-arq/src/main/java/org/apache/jena/http/HttpOp.java 
b/jena-arq/src/main/java/org/apache/jena/http/HttpOp.java
index d2ad2e2216..078844ce29 100644
--- a/jena-arq/src/main/java/org/apache/jena/http/HttpOp.java
+++ b/jena-arq/src/main/java/org/apache/jena/http/HttpOp.java
@@ -22,11 +22,7 @@
 package org.apache.jena.http;
 
 import static org.apache.jena.http.HttpLib.*;
-import static org.apache.jena.http.Push.PATCH;
-import static org.apache.jena.http.Push.POST;
-import static org.apache.jena.http.Push.PUT;
-import static org.apache.jena.riot.web.HttpNames.METHOD_HEAD;
-import static org.apache.jena.riot.web.HttpNames.METHOD_OPTIONS;
+import static org.apache.jena.http.HttpMethod.*;
 
 import java.io.InputStream;
 import java.net.Authenticator;
@@ -370,12 +366,12 @@ public class HttpOp {
      * @see BodyPublishers#ofString
      */
     public static void httpPatch(HttpClient httpClient, String url, String 
contentType, BodyPublisher body) {
-        execPushData(httpClient, PATCH, url, contentType, body);
+        execPushData(httpClient, PATCH,  url, contentType, body);
     }
 
     /** Push data. POST, PUT, PATCH request with no response body data. */
-    private static void execPushData(HttpClient httpClient, Push style, String 
url, String contentType, BodyPublisher body) {
-        HttpLib.httpPushData(httpClient, style, url, 
setContentTypeHeader(contentType), body);
+    private static void execPushData(HttpClient httpClient, HttpMethod method, 
String url, String contentType, BodyPublisher body) {
+        HttpLib.httpPushData(httpClient, method, url, 
setContentTypeHeader(contentType), body);
     }
 
     // ---- DELETE
@@ -408,7 +404,7 @@ public class HttpOp {
     public static String httpOptions(HttpClient httpClient, String url) {
         // Need to access the response headers
         HttpRequest.Builder builder =
-                
HttpLib.requestBuilderFor(url).uri(toRequestURI(url)).method(METHOD_OPTIONS, 
BodyPublishers.noBody());
+                
HttpLib.requestBuilderFor(url).uri(toRequestURI(url)).method(OPTIONS.method(), 
BodyPublishers.noBody());
         HttpRequest request = builder.build();
         HttpResponse<InputStream> response = execute(httpClient, request);
         String allowValue = HttpLib.responseHeader(response, HttpNames.hAllow);
@@ -452,7 +448,7 @@ public class HttpOp {
      */
     public static String httpHead(HttpClient httpClient, String url, String 
acceptHeader) {
         HttpRequest.Builder builder =
-                
HttpLib.requestBuilderFor(url).uri(toRequestURI(url)).method(METHOD_HEAD, 
BodyPublishers.noBody());
+                
HttpLib.requestBuilderFor(url).uri(toRequestURI(url)).method(HEAD.method(), 
BodyPublishers.noBody());
         HttpLib.acceptHeader(builder, acceptHeader);
         HttpRequest request = builder.build();
         HttpResponse<InputStream> response = execute(httpClient, request);
diff --git a/jena-arq/src/main/java/org/apache/jena/http/HttpRDF.java 
b/jena-arq/src/main/java/org/apache/jena/http/HttpRDF.java
index f7d5cbbaef..36a3ee8fdb 100644
--- a/jena-arq/src/main/java/org/apache/jena/http/HttpRDF.java
+++ b/jena-arq/src/main/java/org/apache/jena/http/HttpRDF.java
@@ -180,7 +180,7 @@ public class HttpRDF {
     public static void httpPostGraph(HttpClient httpClient, String url, Graph 
graph,
                                      RDFFormat format, Map<String, String> 
httpHeaders) {
         BodyPublisher bodyPublisher = graphToHttpBody(graph, format);
-        pushBody(httpClient, url, Push.POST, bodyPublisher, format, 
httpHeaders);
+        pushBody(httpClient, url, HttpMethod.POST, bodyPublisher, format, 
httpHeaders);
     }
 
     /** Post a graph and expect an RDF graph back as the result. */
@@ -191,7 +191,7 @@ public class HttpRDF {
     /** Post a graph and expect an RDF graph back as the result. */
     public static Graph httpPostGraphRtn(HttpClient httpClient, String url, 
Graph graph, RDFFormat format, Map<String, String> httpHeaders) {
         BodyPublisher bodyPublisher = graphToHttpBody(graph, 
HttpEnv.defaultTriplesFormat);
-        HttpResponse<InputStream> httpResponse = pushWithResponse(httpClient, 
url, Push.POST, bodyPublisher, format, httpHeaders);
+        HttpResponse<InputStream> httpResponse = pushWithResponse(httpClient, 
url, HttpMethod.POST, bodyPublisher, format, httpHeaders);
         Graph graphResponse = GraphFactory.createDefaultGraph();
         StreamRDF dest = StreamRDFLib.graph(graphResponse);
         httpResponseToStreamRDF(url, httpResponse, dest);
@@ -205,7 +205,7 @@ public class HttpRDF {
     public static void httpPostDataset(HttpClient httpClient, String url, 
DatasetGraph dataset,
                                        RDFFormat format, Map<String, String> 
httpHeaders) {
         BodyPublisher bodyPublisher = datasetToHttpBody(dataset, format);
-        pushBody(httpClient, url, Push.POST, bodyPublisher, format, 
httpHeaders);
+        pushBody(httpClient, url, HttpMethod.POST, bodyPublisher, format, 
httpHeaders);
     }
 
     public static void httpPutGraph(String url, Graph graph) {
@@ -219,7 +219,7 @@ public class HttpRDF {
     public static void httpPutGraph(HttpClient httpClient, String url, Graph 
graph,
                                     RDFFormat format, Map<String, String> 
httpHeaders) {
         BodyPublisher bodyPublisher = graphToHttpBody(graph, format);
-        pushBody(httpClient, url, Push.PUT, bodyPublisher, format, 
httpHeaders);
+        pushBody(httpClient, url, HttpMethod.PUT, bodyPublisher, format, 
httpHeaders);
     }
 
     public static void httpPutDataset(HttpClient httpClient, String url, 
DatasetGraph dataset, RDFFormat format) {
@@ -229,28 +229,28 @@ public class HttpRDF {
     public static void httpPutDataset(HttpClient httpClient, String url, 
DatasetGraph dataset,
                                       RDFFormat format, Map<String, String> 
httpHeaders) {
         BodyPublisher bodyPublisher = datasetToHttpBody(dataset, format);
-        pushBody(httpClient, url, Push.PUT, bodyPublisher, format, 
httpHeaders);
+        pushBody(httpClient, url, HttpMethod.PUT, bodyPublisher, format, 
httpHeaders);
     }
 
     // Shared between push* and put*
-    private static void pushBody(HttpClient httpClient, String url, Push 
style, BodyPublisher bodyPublisher,
+    private static void pushBody(HttpClient httpClient, String url, HttpMethod 
method, BodyPublisher bodyPublisher,
                                  RDFFormat format, Map<String, String> 
httpHeaders) {
         String contentType = format.getLang().getHeaderString();
         if ( httpHeaders == null )
             httpHeaders = Collections.singletonMap(HttpNames.hContentType, 
contentType);
         else
             httpHeaders.put(HttpNames.hContentType, contentType);
-        HttpLib.httpPushData(httpClient, style, url, 
HttpLib.setHeaders(httpHeaders), bodyPublisher);
+        HttpLib.httpPushData(httpClient, method, url, 
HttpLib.setHeaders(httpHeaders), bodyPublisher);
     }
 
-    private static HttpResponse<InputStream> pushWithResponse(HttpClient 
httpClient, String url, Push style, BodyPublisher bodyPublisher,
+    private static HttpResponse<InputStream> pushWithResponse(HttpClient 
httpClient, String url, HttpMethod method, BodyPublisher bodyPublisher,
                                                               RDFFormat 
format, Map<String, String> httpHeaders) {
         String contentType = format.getLang().getHeaderString();
         if ( httpHeaders == null )
             httpHeaders = Collections.singletonMap(HttpNames.hContentType, 
contentType);
         else
             httpHeaders.put(HttpNames.hContentType, contentType);
-        return HttpLib.httpPushWithResponse(httpClient, style, url, 
HttpLib.setHeaders(httpHeaders), bodyPublisher);
+        return HttpLib.httpPushWithResponse(httpClient, method, url, 
HttpLib.setHeaders(httpHeaders), bodyPublisher);
     }
 
     public static void httpDeleteGraph(String url) {
diff --git a/jena-arq/src/main/java/org/apache/jena/http/Push.java 
b/jena-arq/src/main/java/org/apache/jena/http/Push.java
index 9fd9cac084..efad46fe06 100644
--- a/jena-arq/src/main/java/org/apache/jena/http/Push.java
+++ b/jena-arq/src/main/java/org/apache/jena/http/Push.java
@@ -21,13 +21,13 @@
 
 package org.apache.jena.http;
 
-import static org.apache.jena.riot.web.HttpNames.METHOD_PATCH;
-import static org.apache.jena.riot.web.HttpNames.METHOD_POST;
-import static org.apache.jena.riot.web.HttpNames.METHOD_PUT;
-
-/** Enum for HTTP push operations */
+/**
+ *  Enum for HTTP push operation
+ *  @deprecated Use {@link HttpMethod}
+ */
+@Deprecated(forRemoval = true)
 public enum Push {
-    PUT(METHOD_PUT), POST(METHOD_POST), PATCH(METHOD_PATCH);
+    PUT(HttpMethod.METHOD_PUT), POST(HttpMethod.METHOD_POST), 
PATCH(HttpMethod.METHOD_PATCH);
     private final String method;
 
     Push(String method) {
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/web/HttpNames.java 
b/jena-arq/src/main/java/org/apache/jena/riot/web/HttpNames.java
index 3d171521af..8093410a84 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/web/HttpNames.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/web/HttpNames.java
@@ -21,94 +21,121 @@
 
 package org.apache.jena.riot.web;
 
+import org.apache.jena.http.HttpMethod;
+
 public class HttpNames
 {
     // See also Guava com.google.common.net.HttpHeaders
     // (org.apache.jena.ext.com.google.common.net.HttpHeaders)
 
-    public static final String hAccept              = "Accept" ;
-    public static final String hAcceptCharset       = "Accept-Charset" ;
-    public static final String hAcceptRanges        = "Accept-Ranges" ;
-    public static final String hAcceptEncoding      = "Accept-Encoding" ;
+    public static final String hAccept              = "Accept";
+    public static final String hAcceptCharset       = "Accept-Charset";
+    public static final String hAcceptRanges        = "Accept-Ranges";
+    public static final String hAcceptEncoding      = "Accept-Encoding";
 
-    public static final String hAllow               = "Allow" ;
+    public static final String hAllow               = "Allow";
     public static final String hAuthorization       = "Authorization";
     public static final String hWWWAuthenticate     = "WWW-Authenticate";
-    public static final String hContentEncoding     = "Content-Encoding" ;
-    public static final String hContentLength       = "Content-Length" ;
-    public static final String hContentLocation     = "Content-Location" ;
-    public static final String hContentRange        = "Content-Range" ;
-    public static final String hContentType         = "Content-Type" ;
-    public static final String hPragma              = "Pragma" ;
-    public static final String hCacheControl        = "Cache-Control" ;
-    public static final String hRetryAfter          = "Retry-After" ;
-    public static final String hServer              = "Server" ;
-    public static final String hLocation            = "Location" ;
-    public static final String hVary                = "Vary" ;
-    public static final String hUserAgent           = "User-Agent" ;
+    public static final String hContentEncoding     = "Content-Encoding";
+    public static final String hContentLength       = "Content-Length";
+    public static final String hContentLocation     = "Content-Location";
+    public static final String hContentRange        = "Content-Range";
+    public static final String hContentType         = "Content-Type";
+    public static final String hPragma              = "Pragma";
+    public static final String hCacheControl        = "Cache-Control";
+    public static final String hRetryAfter          = "Retry-After";
+    public static final String hServer              = "Server";
+    public static final String hLocation            = "Location";
+    public static final String hVary                = "Vary";
+    public static final String hUserAgent           = "User-Agent";
 
     // CORS:
     //   http://www.w3.org/TR/cors/  http://esw.w3.org/CORS_Enabled
-    public static final String hAccessControlAllowOrigin        = 
"Access-Control-Allow-Origin" ;
-    public static final String hAccessControlExposeHeaders      = 
"Access-Control-Expose-Headers" ;
-    public static final String hAccessControlMaxAge             = 
"Access-Control-Max-Age" ;
-    public static final String hAccessControlAllowCredentials   = 
"Access-Control-Allow-Credentials" ;
-    public static final String hAccessControlAllowMethods       = 
"Access-Control-Allow-Methods" ;
-    public static final String hAccessControlAllowHeaders       = 
"Access-Control-Allow-Headers" ;
-    public static final String hOrigin                          = "Origin" ;
-    public static final String hAccessControlRequestMethod      = 
"Access-Control-Request-Method" ;
-    public static final String hAccessControlRequestHeaders     = 
"Access-Control-Request-Headers" ;
+    public static final String hOrigin                          = "Origin";
+    public static final String hAccessControlAllowOrigin        = 
"Access-Control-Allow-Origin";
+    public static final String hAccessControlExposeHeaders      = 
"Access-Control-Expose-Headers";
+    public static final String hAccessControlMaxAge             = 
"Access-Control-Max-Age";
+    public static final String hAccessControlAllowCredentials   = 
"Access-Control-Allow-Credentials";
+    public static final String hAccessControlAllowMethods       = 
"Access-Control-Allow-Methods";
+    public static final String hAccessControlAllowHeaders       = 
"Access-Control-Allow-Headers";
+    public static final String hAccessControlRequestMethod      = 
"Access-Control-Request-Method";
+    public static final String hAccessControlRequestHeaders     = 
"Access-Control-Request-Headers";
 
     // Media type parameters.
     // XXX Rename as mtCharset?
-    public static final String charset              = "charset" ;
+    public static final String charset              = "charset";
     // RDF .1.2+ SPARQL 1.2+ HTTP header parameters
-    public static final String mtParamVersion       = "version" ;
+    public static final String mtParamVersion       = "version";
     // RFC 6906 -- https://www.rfc-editor.org/rfc/rfc6906
-    public static final String mtParamProfile       = "profile" ;
+    public static final String mtParamProfile       = "profile";
 
     // GSP parameter names
-    public static final String paramGraph           = "graph" ;
-    public static final String paramGraphDefault    = "default" ;
+    public static final String paramGraph           = "graph";
+    public static final String paramGraphDefault    = "default";
 
     // Special names for GSP targets (use in ?graph=)
-    public static final String graphTargetDefault   = "default" ;
-    public static final String graphTargetUnion     = "union" ;
+    public static final String graphTargetDefault   = "default";
+    public static final String graphTargetUnion     = "union";
 
     // SPARQL query parameter names
-    public static final String paramQuery           = "query" ;
-    public static final String paramQueryRef        = "query-ref" ;
-    public static final String paramDefaultGraphURI = "default-graph-uri" ;
-    public static final String paramNamedGraphURI   = "named-graph-uri" ;
-    public static final String paramTarget          = "target" ;
+    public static final String paramQuery           = "query";
+    public static final String paramQueryRef        = "query-ref";
+    public static final String paramDefaultGraphURI = "default-graph-uri";
+    public static final String paramNamedGraphURI   = "named-graph-uri";
+    public static final String paramTarget          = "target";
 
     // SPARQL Update parameter names
-    public static final String paramUpdate          = "update" ;
-    public static final String paramRequest         = "request" ;   // 
Alternative name.
-    public static final String paramUsingGraphURI        = "using-graph-uri" ;
-    public static final String paramUsingNamedGraphURI   = 
"using-named-graph-uri" ;
+    public static final String paramUpdate          = "update";
+    public static final String paramRequest         = "request";   // 
Alternative name.
+    public static final String paramUsingGraphURI        = "using-graph-uri";
+    public static final String paramUsingNamedGraphURI   = 
"using-named-graph-uri";
 
     // Jena parameter names (SPARQL protocol extensions)
-    public static final String paramStyleSheet      = "stylesheet" ;
-    public static final String paramLang            = "lang" ;
-    public static final String paramAccept          = "accept" ;        // 
Unused
-    public static final String paramOutput1         = "output" ;
-    public static final String paramOutput2         = "format" ;        // 
Alternative name
-    public static final String paramOutput3         = "results" ;       // 
Alternative name
-    public static final String paramCallback        = "callback" ;
-    public static final String paramForceAccept     = "force-accept" ;  // 
Force the accept header at the last moment
-    public static final String paramTimeout         = "timeout" ;
-
-    // Replace by enum HttpMethod
-    public static final String METHOD_DELETE        = "DELETE";
-    public static final String METHOD_HEAD          = "HEAD";
-    public static final String METHOD_GET           = "GET";
-    public static final String METHOD_QUERY         = "QUERY" ;
-    public static final String METHOD_OPTIONS       = "OPTIONS";
-    public static final String METHOD_PATCH         = "PATCH" ;
-    public static final String METHOD_POST          = "POST";
-    public static final String METHOD_PUT           = "PUT";
-    public static final String METHOD_TRACE         = "TRACE";
+    public static final String paramStyleSheet      = "stylesheet";
+    public static final String paramLang            = "lang";
+    public static final String paramAccept          = "accept";        // 
Unused
+    public static final String paramOutput1         = "output";
+    public static final String paramOutput2         = "format";        // 
Alternative name
+    public static final String paramOutput3         = "results";       // 
Alternative name
+    public static final String paramCallback        = "callback";
+    public static final String paramForceAccept     = "force-accept";  // 
Force the accept header at the last moment
+    public static final String paramTimeout         = "timeout";
+
+    /** @deprecated Use {@link HttpMethod#METHOD_DELETE} instead */
+    @Deprecated(forRemoval = true)
+    public static final String METHOD_DELETE        = HttpMethod.METHOD_DELETE;
+
+    /** @deprecated Use {@link HttpMethod#METHOD_HEAD} instead */
+    @Deprecated(forRemoval = true)
+    public static final String METHOD_HEAD          = HttpMethod.METHOD_HEAD;
+
+    /** @deprecated Use {@link HttpMethod#METHOD_GET} instead */
+    @Deprecated(forRemoval = true)
+    public static final String METHOD_GET           = HttpMethod.METHOD_GET;
+
+    /** @deprecated Use {@link HttpMethod#METHOD_QUERY} instead */
+    @Deprecated(forRemoval = true)
+    public static final String METHOD_QUERY         = HttpMethod.METHOD_QUERY;
+
+    /** @deprecated Use {@link HttpMethod#METHOD_OPTIONS} instead */
+    @Deprecated(forRemoval = true)
+    public static final String METHOD_OPTIONS       = 
HttpMethod.METHOD_OPTIONS;
+
+    /** @deprecated Use {@link HttpMethod#METHOD_PATCH} instead */
+    @Deprecated(forRemoval = true)
+    public static final String METHOD_PATCH         = HttpMethod.METHOD_PATCH;
+
+    /** @deprecated Use {@link HttpMethod#METHOD_POST} instead */
+    @Deprecated(forRemoval = true)
+    public static final String METHOD_POST          = HttpMethod.METHOD_POST;
+
+    /** @deprecated Use {@link HttpMethod#METHOD_PUT} instead */
+    @Deprecated(forRemoval = true)
+    public static final String METHOD_PUT           = HttpMethod.METHOD_PUT;
+
+    /** @deprecated Use {@link HttpMethod#METHOD_TRACE} instead */
+    @Deprecated(forRemoval = true)
+    public static final String METHOD_TRACE         = HttpMethod.METHOD_TRACE;
 
     public static final String HEADER_IFMODSINCE    = "If-Modified-Since";
     public static final String HEADER_LASTMOD       = "Last-Modified";
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/exec/http/DSP.java 
b/jena-arq/src/main/java/org/apache/jena/sparql/exec/http/DSP.java
index fbd028e975..9b4907c6a2 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/exec/http/DSP.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/exec/http/DSP.java
@@ -26,8 +26,8 @@ import java.util.Map;
 
 import org.apache.jena.atlas.lib.FileOps;
 import org.apache.jena.http.HttpEnv;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.http.HttpRDF;
-import org.apache.jena.http.Push;
 import org.apache.jena.riot.Lang;
 import org.apache.jena.riot.RDFFormat;
 import org.apache.jena.riot.RDFLanguages;
@@ -103,7 +103,7 @@ public class DSP extends StoreProtocol<DSP>{
             throw new IllegalArgumentException("No such file: "+file);
         String fileExtContentType = contentTypeFromFilename(file);
         HttpClient hc = requestHttpClient(serviceEndpoint, serviceEndpoint);
-        uploadQuads(hc, serviceEndpoint, file, fileExtContentType, 
httpHeaders, Push.POST);
+        uploadQuads(hc, serviceEndpoint, file, fileExtContentType, 
httpHeaders, HttpMethod.POST);
     }
 
     /** POST a dataset */
@@ -124,7 +124,7 @@ public class DSP extends StoreProtocol<DSP>{
             throw new IllegalArgumentException("No such file: "+file);
         String fileExtContentType = contentTypeFromFilename(file);
         HttpClient hc = requestHttpClient(serviceEndpoint, serviceEndpoint);
-        uploadQuads(hc, serviceEndpoint, file, fileExtContentType, 
httpHeaders, Push.PUT);
+        uploadQuads(hc, serviceEndpoint, file, fileExtContentType, 
httpHeaders, HttpMethod.PUT);
     }
 
     /** PUT a dataset */
@@ -145,10 +145,10 @@ public class DSP extends StoreProtocol<DSP>{
      * Send a file of quads to a URL. The Content-Type is inferred from the 
file
      * extension.
      */
-    private static void uploadQuads(HttpClient httpClient, String endpoint, 
String file, String fileExtContentType, Map<String, String> headers, Push mode) 
{
+    private static void uploadQuads(HttpClient httpClient, String endpoint, 
String file, String fileExtContentType, Map<String, String> headers, HttpMethod 
method) {
         Lang lang = RDFLanguages.contentTypeToLang(fileExtContentType);
         if ( !RDFLanguages.isQuads(lang) && !RDFLanguages.isTriples(lang) )
             throw new ARQException("Not an RDF format: " + file + " (lang=" + 
lang + ")");
-        pushFile(httpClient, endpoint, file, fileExtContentType, headers, 
mode);
+        pushFile(httpClient, endpoint, file, fileExtContentType, headers, 
method);
     }
 }
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/exec/http/GSP.java 
b/jena-arq/src/main/java/org/apache/jena/sparql/exec/http/GSP.java
index 22a10b96ed..34503a7c3d 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/exec/http/GSP.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/exec/http/GSP.java
@@ -29,8 +29,8 @@ import org.apache.jena.graph.Graph;
 import org.apache.jena.graph.Node;
 import org.apache.jena.http.HttpEnv;
 import org.apache.jena.http.HttpLib;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.http.HttpRDF;
-import org.apache.jena.http.Push;
 import org.apache.jena.riot.Lang;
 import org.apache.jena.riot.RDFFormat;
 import org.apache.jena.riot.RDFLanguages;
@@ -184,7 +184,7 @@ public class GSP extends StoreProtocol<GSP> {
         String url = graphRequestURL();
         String fileExtContentType = contentTypeFromFilename(file);
         HttpClient hc = requestHttpClient(serviceEndpoint, url);
-        uploadTriples(hc, url, file, fileExtContentType, httpHeaders, 
Push.POST);
+        uploadTriples(hc, url, file, fileExtContentType, httpHeaders, 
HttpMethod.POST);
     }
 
 //    /**
@@ -234,7 +234,7 @@ public class GSP extends StoreProtocol<GSP> {
         String url = graphRequestURL();
         String fileExtContentType = contentTypeFromFilename(file);
         HttpClient hc = requestHttpClient(serviceEndpoint, url);
-        uploadTriples(hc, url, file, fileExtContentType, httpHeaders, 
Push.PUT);
+        uploadTriples(hc, url, file, fileExtContentType, httpHeaders, 
HttpMethod.PUT);
     }
 
 //    /**
@@ -330,7 +330,7 @@ public class GSP extends StoreProtocol<GSP> {
 
     /** Send a file of triples to a URL. */
     private static void uploadTriples(HttpClient httpClient, String gspUrl, 
String file, String fileExtContentType,
-                                      Map<String, String> headers, Push mode) {
+                                      Map<String, String> headers, HttpMethod 
method) {
         Lang lang = RDFLanguages.contentTypeToLang(fileExtContentType);
         if ( lang == null )
             throw new ARQException("Not a recognized as an RDF format: 
"+fileExtContentType);
@@ -338,6 +338,6 @@ public class GSP extends StoreProtocol<GSP> {
             throw new ARQException("Can't load quads into a graph");
         if ( ! RDFLanguages.isTriples(lang) )
             throw new ARQException("Not an RDF format: "+file+" 
(lang="+lang+")");
-        pushFile(httpClient, gspUrl, file, fileExtContentType, headers, mode);
+        pushFile(httpClient, gspUrl, file, fileExtContentType, headers, 
method);
     }
 }
diff --git 
a/jena-arq/src/main/java/org/apache/jena/sparql/exec/http/StoreProtocol.java 
b/jena-arq/src/main/java/org/apache/jena/sparql/exec/http/StoreProtocol.java
index ed46fd6c65..835b296d27 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/exec/http/StoreProtocol.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/exec/http/StoreProtocol.java
@@ -35,7 +35,7 @@ import org.apache.jena.atlas.web.ContentType;
 import org.apache.jena.atlas.web.HttpException;
 import org.apache.jena.http.HttpEnv;
 import org.apache.jena.http.HttpLib;
-import org.apache.jena.http.Push;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.riot.*;
 import org.apache.jena.riot.system.StreamRDFWriter;
 import org.apache.jena.riot.web.HttpNames;
@@ -236,13 +236,13 @@ public abstract class StoreProtocol<X extends 
StoreProtocol<X>> {
 
     /** Send a file. fileContentType takes precedence over this.contentType.*/
     protected static void pushFile(HttpClient httpClient, String endpoint, 
String file, String fileContentType,
-                                   Map<String, String> httpHeaders, Push 
style) {
+                                   Map<String, String> httpHeaders, HttpMethod 
method) {
         try {
             Path path = Path.of(file);
             if ( fileContentType != null )
                 httpHeaders.put(HttpNames.hContentType, fileContentType);
             BodyPublisher body = BodyPublishers.ofFile(path);
-            HttpLib.httpPushData(httpClient, style, endpoint, 
HttpLib.setHeaders(httpHeaders), body);
+            HttpLib.httpPushData(httpClient, method, endpoint, 
HttpLib.setHeaders(httpHeaders), body);
         } catch (FileNotFoundException ex) {
             throw new NotFoundException(file);
         }
diff --git 
a/jena-fuseki2/jena-fuseki-access/src/main/java/org/apache/jena/fuseki/access/AccessCtl_AllowGET.java
 
b/jena-fuseki2/jena-fuseki-access/src/main/java/org/apache/jena/fuseki/access/AccessCtl_AllowGET.java
index 4b6cac2ec2..1edef1ffd0 100644
--- 
a/jena-fuseki2/jena-fuseki-access/src/main/java/org/apache/jena/fuseki/access/AccessCtl_AllowGET.java
+++ 
b/jena-fuseki2/jena-fuseki-access/src/main/java/org/apache/jena/fuseki/access/AccessCtl_AllowGET.java
@@ -25,6 +25,7 @@ import org.apache.jena.atlas.lib.InternalErrorException;
 import org.apache.jena.fuseki.servlets.ActionService;
 import org.apache.jena.fuseki.servlets.HttpAction;
 import org.apache.jena.fuseki.servlets.ServletOps;
+import org.apache.jena.http.HttpMethod;
 
 /**
  * Wrapper for an {@link ActionService} that rejects a request with a "write" 
HTTP
@@ -50,7 +51,7 @@ public class AccessCtl_AllowGET extends ActionService {
     public void execute(HttpAction action) {
         other.execute(action);
     }
-    
+
     // Allow
     @Override
     public void execHead(HttpAction action) {
@@ -62,17 +63,14 @@ public class AccessCtl_AllowGET extends ActionService {
     public void execGet(HttpAction action) {
         executeLifecycle(action);
     }
-    
+
     // Deny all others.
     @Override
-    public void execAny(String methodName, HttpAction action) {
+    public void execAny(HttpMethod method, HttpAction action) {
         if ( label == null )
             ServletOps.errorBadRequest("Not supported");
         else
             ServletOps.errorBadRequest(label+" : not supported");
         throw new InternalErrorException("AccessCtl_AllowGET: "+ "didn't 
reject request");
     }
-
-    
-    
 }
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/ActionContainerItem.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/ActionContainerItem.java
index 5280a62c79..e9e6d84b2b 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/ActionContainerItem.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/ActionContainerItem.java
@@ -21,14 +21,11 @@
 
 package org.apache.jena.fuseki.ctl;
 
-import static org.apache.jena.riot.web.HttpNames.METHOD_DELETE;
-import static org.apache.jena.riot.web.HttpNames.METHOD_GET;
-import static org.apache.jena.riot.web.HttpNames.METHOD_POST;
-
 import org.apache.jena.atlas.json.JsonValue;
 import org.apache.jena.fuseki.servlets.ActionLib;
 import org.apache.jena.fuseki.servlets.HttpAction;
 import org.apache.jena.fuseki.servlets.ServletOps;
+import org.apache.jena.http.HttpMethod;
 
 /** Base for actions that are container and also have actions on items */
 public abstract class ActionContainerItem extends ActionCtl {
@@ -39,11 +36,11 @@ public abstract class ActionContainerItem extends ActionCtl 
{
     final
     public void execute(HttpAction action) {
         String method = action.getRequestMethod();
-        if ( method.equals(METHOD_GET) )
+        if ( method.equals(HttpMethod.METHOD_GET) )
             performGet(action);
-        else if ( method.equals(METHOD_POST) )
+        else if ( method.equals(HttpMethod.METHOD_POST) )
             performPost(action);
-        else if ( method.equals(METHOD_DELETE) )
+        else if ( method.equals(HttpMethod.METHOD_DELETE) )
             performDelete(action);
         else
             ServletOps.errorMethodNotAllowed(action.getRequestMethod());
@@ -103,11 +100,11 @@ public abstract class ActionContainerItem extends 
ActionCtl {
 
     /** DELETE request on an item in the container */
     protected void execDeleteContainer(HttpAction action) {
-        ServletOps.errorMethodNotAllowed(METHOD_DELETE, "DELETE applied to a 
container");
+        ServletOps.errorMethodNotAllowed(HttpMethod.METHOD_DELETE, "DELETE 
applied to a container");
     }
 
     /** DELETE request on an item in the container */
     protected void execDeleteItem(HttpAction action) {
-        ServletOps.errorMethodNotAllowed(METHOD_DELETE);
+        ServletOps.errorMethodNotAllowed(HttpMethod.METHOD_DELETE);
     }
 }
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/ActionStatsText.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/ActionStatsText.java
index 097cb074c4..b4d15c4890 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/ActionStatsText.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/ActionStatsText.java
@@ -31,8 +31,8 @@ import org.apache.jena.atlas.io.IO;
 import org.apache.jena.fuseki.server.*;
 import org.apache.jena.fuseki.servlets.HttpAction;
 import org.apache.jena.fuseki.servlets.ServletOps;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.riot.WebContent;
-import org.apache.jena.riot.web.HttpNames;
 
 // Unused - left in case it should be resurrected.
 public class ActionStatsText extends ActionCtl
@@ -42,8 +42,8 @@ public class ActionStatsText extends ActionCtl
     @Override
     public void validate(HttpAction action) {
         switch(action.getRequestMethod() ) {
-            case HttpNames.METHOD_GET:
-            case HttpNames.METHOD_POST:
+            case HttpMethod.METHOD_GET:
+            case HttpMethod.METHOD_POST:
                 return;
             default:
                 ServletOps.errorMethodNotAllowed(action.getRequestMethod());
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/ActionTasks.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/ActionTasks.java
index 1b8046132a..92d1f81013 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/ActionTasks.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/ActionTasks.java
@@ -21,8 +21,6 @@
 
 package org.apache.jena.fuseki.ctl;
 import static java.lang.String.format;
-import static org.apache.jena.riot.web.HttpNames.METHOD_GET;
-import static org.apache.jena.riot.web.HttpNames.METHOD_POST;
 
 import org.apache.jena.atlas.json.JsonBuilder;
 import org.apache.jena.atlas.json.JsonValue;
@@ -31,6 +29,7 @@ import org.apache.jena.fuseki.async.AsyncTask;
 import org.apache.jena.fuseki.servlets.ActionLib;
 import org.apache.jena.fuseki.servlets.HttpAction;
 import org.apache.jena.fuseki.servlets.ServletOps;
+import org.apache.jena.http.HttpMethod;
 
 public class ActionTasks extends ActionCtl
 {
@@ -60,9 +59,9 @@ public class ActionTasks extends ActionCtl
         }
 
         String method = action.getRequestMethod();
-        if ( method.equals(METHOD_GET) )
+        if ( method.equals(HttpMethod.METHOD_GET) )
             execGet(action, name);
-        else if ( method.equals(METHOD_POST) )
+        else if ( method.equals(HttpMethod.METHOD_POST) )
             execPost(action, name);
         else
             ServletOps.errorMethodNotAllowed(action.getRequestMethod());
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Dispatcher.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Dispatcher.java
index f41492e9c9..c07946f0ea 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Dispatcher.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/Dispatcher.java
@@ -40,6 +40,7 @@ import org.apache.jena.fuseki.Fuseki;
 import org.apache.jena.fuseki.auth.Auth;
 import org.apache.jena.fuseki.servlets.*;
 import org.apache.jena.fuseki.system.ActionCategory;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.riot.web.HttpNames;
 import org.apache.jena.web.HttpSC;
 import org.slf4j.Logger;
@@ -438,7 +439,7 @@ public class Dispatcher {
             } else if ( GSP_RW.equals(operation) ) {
                 // If asking for GSP_RW, but only GSP_R is available ...
                 // ... if OPTIONS, use GSP_R.
-                if ( 
action.getRequestMethod().equals(HttpNames.METHOD_OPTIONS) && 
epSet.contains(GSP_R) )
+                if ( 
action.getRequestMethod().equals(HttpMethod.METHOD_OPTIONS) && 
epSet.contains(GSP_R) )
                         return GSP_R;
                 // ... else 405
                 if ( epSet.contains(GSP_R) )
@@ -569,8 +570,8 @@ public class Dispatcher {
     private static boolean isReadMethod(HttpServletRequest request) {
         String method = request.getMethod();
         // REST dataset.
-        boolean isGET = method.equals(HttpNames.METHOD_GET);
-        boolean isHEAD = method.equals(HttpNames.METHOD_HEAD);
+        boolean isGET = method.equals(HttpMethod.METHOD_GET);
+        boolean isHEAD = method.equals(HttpMethod.METHOD_HEAD);
         return isGET || isHEAD;
     }
 }
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionExecLib.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionExecLib.java
index 217ef94ed8..d5eba96029 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionExecLib.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionExecLib.java
@@ -35,6 +35,7 @@ import org.apache.jena.atlas.web.HttpException;
 import org.apache.jena.fuseki.Fuseki;
 import org.apache.jena.fuseki.server.*;
 import org.apache.jena.fuseki.system.ActionCategory;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.query.QueryCancelledException;
 import org.apache.jena.query.QueryDeniedException;
 import org.apache.jena.riot.web.HttpNames;
@@ -333,7 +334,7 @@ public class ActionExecLib {
         ActionLib.setCommonHeaders(action);
         String method = action.getRequestMethod();
         // All GET and HEAD operations are sensitive to conneg so ...
-        if ( HttpNames.METHOD_GET.equalsIgnoreCase(method) || 
HttpNames.METHOD_HEAD.equalsIgnoreCase(method) )
+        if ( HttpMethod.METHOD_GET.equalsIgnoreCase(method) || 
HttpMethod.METHOD_HEAD.equalsIgnoreCase(method) )
             ServletBase.setVaryHeader(action.getResponse());
     }
 
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionLib.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionLib.java
index 884c50de4c..1ac65144fa 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionLib.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionLib.java
@@ -23,7 +23,6 @@ package org.apache.jena.fuseki.servlets;
 
 import static java.lang.String.format;
 import static org.apache.jena.atlas.lib.Lib.equalsOrNulls;
-import static org.apache.jena.riot.web.HttpNames.METHOD_POST;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -49,6 +48,7 @@ import org.apache.jena.fuseki.server.DataAccessPointRegistry;
 import org.apache.jena.fuseki.system.ConNeg;
 import org.apache.jena.fuseki.system.FusekiNetLib;
 import org.apache.jena.graph.Graph;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.riot.*;
 import org.apache.jena.riot.system.*;
 import org.apache.jena.riot.web.HttpNames;
@@ -398,7 +398,7 @@ public class ActionLib {
 
     public static boolean isHTMLForm(HttpAction action) {
         String method = action.getRequestMethod();
-        if ( ! method.equals(METHOD_POST) )
+        if ( ! method.equals(HttpMethod.METHOD_POST) )
             return false;
 
         String ct = getContentMediaType(action);
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionProcessor.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionProcessor.java
index 728241fcac..56e5d28720 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionProcessor.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionProcessor.java
@@ -21,7 +21,7 @@
 
 package org.apache.jena.fuseki.servlets;
 
-import static org.apache.jena.riot.web.HttpNames.*;
+import org.apache.jena.http.HttpMethod;
 
 /** Interface for executing {@link HttpAction}. */
 public interface ActionProcessor {
@@ -33,33 +33,37 @@ public interface ActionProcessor {
      */
     public default void process(HttpAction action) {
         switch ( action.getRequestMethod() ) {
-            case METHOD_GET ->       execGet(action);
-            case METHOD_QUERY ->     execQuery(action);
-            case METHOD_POST ->      execPost(action);
-            case METHOD_PATCH ->     execPatch(action);
-            case METHOD_PUT ->       execPut(action);
-            case METHOD_DELETE ->    execDelete(action);
-            case METHOD_HEAD ->      execHead(action);
-            case METHOD_OPTIONS ->   execOptions(action);
-            case METHOD_TRACE ->     execTrace(action);
-            default -> execAny(action.getRequestMethod(), action);
+            case HttpMethod.METHOD_GET ->       execGet(action);
+            case HttpMethod.METHOD_QUERY ->     execQuery(action);
+            case HttpMethod.METHOD_POST ->      execPost(action);
+            case HttpMethod.METHOD_PATCH ->     execPatch(action);
+            case HttpMethod.METHOD_PUT ->       execPut(action);
+            case HttpMethod.METHOD_DELETE ->    execDelete(action);
+            case HttpMethod.METHOD_HEAD ->      execHead(action);
+            case HttpMethod.METHOD_OPTIONS ->   execOptions(action);
+            case HttpMethod.METHOD_TRACE ->     execTrace(action);
+            default -> execUnknown(action.getRequestMethod(), action);
         }
     }
 
     // Override to support the operation.
     // A common override is "executeLifecycle(action);"
-    public default void execHead(HttpAction action)     { execAny(METHOD_HEAD, 
   action); }
-    public default void execGet(HttpAction action)      { execAny(METHOD_GET,  
   action); }
-    public default void execQuery(HttpAction action)    { 
execAny(METHOD_QUERY,   action); }
-    public default void execPost(HttpAction action)     { execAny(METHOD_POST, 
   action); }
-    public default void execPatch(HttpAction action)    { 
execAny(METHOD_PATCH,   action); }
-    public default void execPut(HttpAction action)      { execAny(METHOD_PUT,  
   action); }
-    public default void execDelete(HttpAction action)   { 
execAny(METHOD_DELETE,  action); }
-    public default void execOptions(HttpAction action)  { 
execAny(METHOD_OPTIONS, action); }
-    public default void execTrace(HttpAction action)    { 
execAny(METHOD_TRACE,   action); }
+    public default void execHead(HttpAction action)     { 
execAny(HttpMethod.HEAD,    action); }
+    public default void execGet(HttpAction action)      { 
execAny(HttpMethod.GET,     action); }
+    public default void execQuery(HttpAction action)    { 
execAny(HttpMethod.QUERY,   action); }
+    public default void execPost(HttpAction action)     { 
execAny(HttpMethod.POST,    action); }
+    public default void execPatch(HttpAction action)    { 
execAny(HttpMethod.PATCH,   action); }
+    public default void execPut(HttpAction action)      { 
execAny(HttpMethod.PUT,     action); }
+    public default void execDelete(HttpAction action)   { 
execAny(HttpMethod.DELETE,  action); }
+    public default void execOptions(HttpAction action)  { 
execAny(HttpMethod.OPTIONS, action); }
+    public default void execTrace(HttpAction action)    { 
execAny(HttpMethod.TRACE,   action); }
 
     // Override this for all HTTP verbs.
-    public default void execAny(String methodName, HttpAction action) {
-        ServletOps.errorMethodNotAllowed(methodName);
+    public default void execAny(HttpMethod method, HttpAction action) {
+        ServletOps.errorMethodNotAllowed(method.method());
+    }
+
+    public default void execUnknown(String unknownMethod, HttpAction action) {
+        ServletOps.errorMethodNotAllowed(unknownMethod);
     }
 }
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionREST.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionREST.java
index e26e47d054..576df7721b 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionREST.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/ActionREST.java
@@ -23,9 +23,9 @@ package org.apache.jena.fuseki.servlets;
 
 import static org.apache.jena.atlas.lib.Lib.uppercase;
 import static org.apache.jena.fuseki.servlets.ActionExecLib.incCounter;
-import static org.apache.jena.riot.web.HttpNames.*;
 
 import org.apache.jena.fuseki.server.CounterName;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.sparql.core.DatasetGraph;
 
 /** Common point for operations that are "REST"ish (use GET/PUT etc as 
operations). */
@@ -40,14 +40,14 @@ public abstract class ActionREST extends ActionService
         // Intercept to put counters around calls.
         String method = uppercase(action.getRequestMethod());
         switch(method) {
-            case METHOD_GET ->      doGet$(action);
-            case METHOD_HEAD ->     doHead$(action);
-            case METHOD_POST ->     doPost$(action);
-            case METHOD_PATCH ->    doPatch$(action);
-            case METHOD_PUT ->      doPut$(action);
-            case METHOD_DELETE ->   doDelete$(action);
-            case METHOD_OPTIONS ->  doOptions$(action);
-            case METHOD_TRACE ->    doTrace$(action);
+            case HttpMethod.METHOD_GET ->      doGet$(action);
+            case HttpMethod.METHOD_HEAD ->     doHead$(action);
+            case HttpMethod.METHOD_POST ->     doPost$(action);
+            case HttpMethod.METHOD_PATCH ->    doPatch$(action);
+            case HttpMethod.METHOD_PUT ->      doPut$(action);
+            case HttpMethod.METHOD_DELETE ->   doDelete$(action);
+            case HttpMethod.METHOD_OPTIONS ->  doOptions$(action);
+            case HttpMethod.METHOD_TRACE ->    doTrace$(action);
             default -> ServletOps.errorNotImplemented("Unknown method: 
"+method);
         }
     }
@@ -152,7 +152,6 @@ public abstract class ActionREST extends ActionService
     protected abstract void doOptions(HttpAction action);
 
     // If not final in ActionBase
-    @Override public void process(HttpAction action)      { 
executeLifecycle(action); }
-
-    @Override public void execAny(String methodName, HttpAction action)     { 
executeLifecycle(action); }
+    @Override public void process(HttpAction action)                        { 
executeLifecycle(action); }
+    @Override public void execAny(HttpMethod method, HttpAction action)     { 
executeLifecycle(action); }
 }
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/NoOpActionService.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/NoOpActionService.java
index f306d5521a..63375f208d 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/NoOpActionService.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/NoOpActionService.java
@@ -21,9 +21,11 @@
 
 package org.apache.jena.fuseki.servlets;
 
-/** An {@link ActionService} that denies service. 
+import org.apache.jena.http.HttpMethod;
+
+/** An {@link ActionService} that denies service.
  *  Used to turn things off.
- */ 
+ */
 public class NoOpActionService extends ActionService {
 
     @Override
@@ -35,6 +37,9 @@ public class NoOpActionService extends ActionService {
     public void execute(HttpAction action) {
         ServletOps.errorBadRequest(action.getActionURI());
     }
-    
-    @Override public void execAny(String methodName, HttpAction action)     { 
executeLifecycle(action); }
+
+    @Override
+    public void execAny(HttpMethod method, HttpAction action) {
+        executeLifecycle(action);
+    }
 }
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/PatchApply.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/PatchApply.java
index b249ba6fb0..ef840bd21c 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/PatchApply.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/PatchApply.java
@@ -29,6 +29,7 @@ import java.io.InputStream;
 
 import org.apache.jena.atlas.web.ContentType;
 import org.apache.jena.fuseki.server.CounterName;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.rdfpatch.PatchException;
 import org.apache.jena.rdfpatch.RDFChanges;
 import org.apache.jena.rdfpatch.changes.*;
@@ -57,8 +58,8 @@ public class PatchApply extends ActionREST {
     public void validate(HttpAction action) {
         String method = action.getRequest().getMethod();
         switch(method) {
-            case HttpNames.METHOD_POST:
-            case HttpNames.METHOD_PATCH:
+            case HttpMethod.METHOD_POST:
+            case HttpMethod.METHOD_PATCH:
                 break;
             default:
                 ServletOps.errorMethodNotAllowed(method+" : Patch must use 
POST or PATCH");
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQLQueryProcessor.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQLQueryProcessor.java
index 7ba6662a1f..6192fdbf79 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQLQueryProcessor.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQLQueryProcessor.java
@@ -44,6 +44,7 @@ import org.apache.jena.atlas.web.ContentType;
 import org.apache.jena.fuseki.Fuseki;
 import org.apache.jena.fuseki.system.FusekiNetLib;
 import org.apache.jena.graph.Graph;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.query.*;
 import org.apache.jena.riot.web.HttpNames;
 import org.apache.jena.sparql.core.DatasetGraph;
@@ -116,13 +117,13 @@ public abstract class SPARQLQueryProcessor extends 
ActionService
     public void validate(HttpAction action) {
         String method = uppercase(action.getRequestMethod());
 
-        if ( HttpNames.METHOD_OPTIONS.equals(method) )
+        if ( HttpMethod.METHOD_OPTIONS.equals(method) )
             return;
 
-        if ( !HttpNames.METHOD_POST.equals(method) && 
!HttpNames.METHOD_GET.equals(method) )
+        if ( !HttpMethod.METHOD_POST.equals(method) && 
!HttpMethod.METHOD_GET.equals(method) )
             ServletOps.errorMethodNotAllowed("Not a GET or POST request");
 
-        if ( HttpNames.METHOD_GET.equals(method) && 
action.getRequestQueryString() == null ) {
+        if ( HttpMethod.METHOD_GET.equals(method) && 
action.getRequestQueryString() == null ) {
             ServletOps.warning(action, "Service Description / SPARQL Query / " 
+ action.getRequestRequestURI());
             ServletOps.errorNotFound("Service Description: " + 
action.getRequestRequestURI());
         }
@@ -198,7 +199,7 @@ public abstract class SPARQLQueryProcessor extends 
ActionService
     @Override
     public final void execute(HttpAction action) {
         // GET
-        if ( action.getRequestMethod().equals(HttpNames.METHOD_GET) ) {
+        if ( action.getRequestMethod().equals(HttpMethod.METHOD_GET) ) {
             executeWithParameter(action);
             return;
         }
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java
index 59b5ae5213..a7306e3860 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Update.java
@@ -49,6 +49,7 @@ import org.apache.jena.atlas.web.ContentType;
 import org.apache.jena.fuseki.Fuseki;
 import org.apache.jena.graph.Node;
 import org.apache.jena.graph.NodeFactory;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.irix.IRIx;
 import org.apache.jena.irix.IRIxResolver;
 import org.apache.jena.query.QueryException;
@@ -85,7 +86,7 @@ public class SPARQL_Update extends ActionService
 
     @Override
     public void execGet(HttpAction action) {
-        ServletOps.errorMethodNotAllowed(HttpNames.METHOD_GET, "SPARQL Update 
is not supported with GET. Use POST or PATCH instead");
+        ServletOps.errorMethodNotAllowed(HttpMethod.METHOD_GET, "SPARQL Update 
is not supported with GET. Use POST or PATCH instead");
     }
 
     @Override
@@ -121,10 +122,10 @@ public class SPARQL_Update extends ActionService
     public void validate(HttpAction action) {
         //HttpServletRequest request = action.getRequest();
 
-        if ( HttpNames.METHOD_OPTIONS.equals(action.getRequestMethod()) )
+        if ( HttpMethod.METHOD_OPTIONS.equals(action.getRequestMethod()) )
             return;
 
-        if ( ! 
HttpNames.METHOD_POST.equalsIgnoreCase(action.getRequestMethod()) && ! 
HttpNames.METHOD_PATCH.equalsIgnoreCase(action.getRequestMethod()) )
+        if ( ! 
HttpMethod.METHOD_POST.equalsIgnoreCase(action.getRequestMethod()) && ! 
HttpMethod.METHOD_PATCH.equalsIgnoreCase(action.getRequestMethod()) )
             ServletOps.errorMethodNotAllowed("SPARQL Update : use POST or 
PATCH");
 
         ContentType ct = updateContentType(action);
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/prefixes/ActionPrefixesBase.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/prefixes/ActionPrefixesBase.java
index 267aba8f01..1aa3d959e8 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/prefixes/ActionPrefixesBase.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/prefixes/ActionPrefixesBase.java
@@ -26,7 +26,7 @@ import org.apache.jena.fuseki.servlets.ActionREST;
 import org.apache.jena.fuseki.servlets.BaseActionREST;
 import org.apache.jena.fuseki.servlets.HttpAction;
 import org.apache.jena.fuseki.servlets.ServletOps;
-import org.apache.jena.riot.web.HttpNames;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.sparql.core.DatasetGraph;
 
 import java.util.Iterator;
@@ -84,9 +84,9 @@ public abstract class ActionPrefixesBase extends 
BaseActionREST {
 
         // Per HTTP operation validation.
         switch ( action.getRequestMethod() ) {
-            case HttpNames.METHOD_GET -> validatePrefixesGET(action);
-            case HttpNames.METHOD_POST -> validatePrefixesPOST(action);
-            case HttpNames.METHOD_DELETE -> validatePrefixesDELETE(action);
+            case HttpMethod.METHOD_GET -> validatePrefixesGET(action);
+            case HttpMethod.METHOD_POST -> validatePrefixesPOST(action);
+            case HttpMethod.METHOD_DELETE -> validatePrefixesDELETE(action);
         }
     }
 
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidatorBase.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidatorBase.java
index 2c095e2d5d..8a67229a29 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidatorBase.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidatorBase.java
@@ -45,7 +45,7 @@ import org.apache.jena.fuseki.servlets.ServletBase;
 import org.apache.jena.fuseki.servlets.ServletOps;
 import org.apache.jena.fuseki.system.ConNeg;
 import org.apache.jena.fuseki.validation.json.ValidationAction;
-import org.apache.jena.riot.web.HttpNames;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.web.HttpSC;
 import org.slf4j.Logger;
 
@@ -107,7 +107,7 @@ public abstract class ValidatorBase extends ServletBase {
         setCommonHeaders(response);
         String method = request.getMethod();
         // All GET and HEAD operations are sensitive to conneg so ...
-        if ( HttpNames.METHOD_GET.equalsIgnoreCase(method) || 
HttpNames.METHOD_HEAD.equalsIgnoreCase(method) )
+        if ( HttpMethod.METHOD_GET.equalsIgnoreCase(method) || 
HttpMethod.METHOD_HEAD.equalsIgnoreCase(method) )
             setVaryHeader(response);
     }
 
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidatorBaseJson.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidatorBaseJson.java
index 6c14b00827..9caaa4a0f7 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidatorBaseJson.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/ValidatorBaseJson.java
@@ -32,12 +32,12 @@ import jakarta.servlet.http.HttpServletResponse;
 import org.apache.jena.atlas.json.JSON;
 import org.apache.jena.atlas.json.JsonObject;
 import org.apache.jena.fuseki.Fuseki;
-import org.apache.jena.riot.web.HttpNames;
 import org.apache.jena.fuseki.servlets.ActionErrorException;
 import org.apache.jena.fuseki.servlets.ActionLib;
 import org.apache.jena.fuseki.servlets.ServletBase;
 import org.apache.jena.fuseki.servlets.ServletOps;
 import org.apache.jena.fuseki.validation.json.ValidationAction;
+import org.apache.jena.http.HttpMethod;
 
 import static org.apache.jena.riot.WebContent.*;
 import org.apache.jena.web.HttpSC;
@@ -96,7 +96,7 @@ public abstract class ValidatorBaseJson extends ServletBase {
         setCommonHeaders(response);
         String method = request.getMethod();
         // All GET and HEAD operations are sensitive to conneg so ...
-        if ( HttpNames.METHOD_GET.equalsIgnoreCase(method) || 
HttpNames.METHOD_HEAD.equalsIgnoreCase(method) )
+        if ( HttpMethod.METHOD_GET.equalsIgnoreCase(method) || 
HttpMethod.METHOD_HEAD.equalsIgnoreCase(method) )
             setVaryHeader(response);
     }
 
diff --git 
a/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/ActionReload.java
 
b/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/ActionReload.java
index d668a5eae1..cb7b059297 100644
--- 
a/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/ActionReload.java
+++ 
b/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/mgt/ActionReload.java
@@ -28,9 +28,9 @@ import org.apache.jena.fuseki.main.FusekiLib;
 import org.apache.jena.fuseki.main.FusekiServer;
 import org.apache.jena.fuseki.servlets.HttpAction;
 import org.apache.jena.fuseki.servlets.ServletOps;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.rdf.model.Model;
 import org.apache.jena.riot.RDFParser;
-import org.apache.jena.riot.web.HttpNames;
 
 /**
  * Administration action to reload the server's dataset configuration.
@@ -43,7 +43,7 @@ public class ActionReload extends ActionCtl {
 
     @Override
     public void validate(HttpAction action) {
-        if ( action.getRequestMethod() != HttpNames.METHOD_POST ) {
+        if ( action.getRequestMethod() != HttpMethod.METHOD_POST ) {
             ServletOps.errorMethodNotAllowed(action.getRequestMethod());
         }
     }
diff --git 
a/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestCrossOriginFilter.java
 
b/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestCrossOriginFilter.java
index 7e7bbdcdf4..aaf29bde8e 100644
--- 
a/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestCrossOriginFilter.java
+++ 
b/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestCrossOriginFilter.java
@@ -22,7 +22,6 @@ package org.apache.jena.fuseki.main;
 
 import static org.apache.jena.fuseki.servlets.CrossOriginFilter.*;
 import static org.apache.jena.http.HttpLib.handleResponseNoBody;
-import static org.apache.jena.riot.web.HttpNames.*;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
@@ -50,6 +49,7 @@ import org.apache.jena.atlas.lib.Lib;
 import org.apache.jena.atlas.web.WebLib;
 import org.apache.jena.fuseki.system.FusekiLogging;
 import org.apache.jena.http.HttpLib;
+import org.apache.jena.http.HttpMethod;
 import org.apache.jena.riot.web.HttpNames;
 
 /**
@@ -110,7 +110,7 @@ public class TestCrossOriginFilter {
             assertSetEquals(allowHeaders, expectedHeaders);
 
             Set<String> allowMethods = getHeaderSet(response, 
ACCESS_CONTROL_ALLOW_METHODS_HEADER);
-            Set<String> expectedMethods = Set.of(METHOD_GET, METHOD_POST, 
METHOD_PUT, METHOD_DELETE, METHOD_HEAD, METHOD_PATCH, METHOD_OPTIONS);
+            Set<String> expectedMethods = Set.of(HttpMethod.METHOD_GET, 
HttpMethod.METHOD_POST, HttpMethod.METHOD_PUT, HttpMethod.METHOD_DELETE, 
HttpMethod.METHOD_HEAD, HttpMethod.METHOD_PATCH, HttpMethod.METHOD_OPTIONS);
             assertSetEquals(allowMethods, expectedMethods);
 
             String allowOriginHeader = getHeader(response, 
ACCESS_CONTROL_ALLOW_ORIGIN_HEADER);
@@ -284,7 +284,7 @@ public class TestCrossOriginFilter {
         HttpClient httpClient = HttpClient.newHttpClient();
         HttpRequest request = HttpRequest.newBuilder()
                 .uri(URI.create(URL))
-                .method(METHOD_OPTIONS, BodyPublishers.noBody())
+                .method(HttpMethod.METHOD_OPTIONS, BodyPublishers.noBody())
                 .headers(headers)
                 .build();
         try {
diff --git 
a/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestUpdate.java
 
b/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestUpdate.java
index 88f67f6219..77506b2070 100644
--- 
a/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestUpdate.java
+++ 
b/jena-fuseki2/jena-fuseki-main/src/test/java/org/apache/jena/fuseki/main/TestUpdate.java
@@ -61,7 +61,6 @@ curl -v -XPOST 
'http://localhost:3030/'"${DS}"'/?using-named-graph-uri=http%3A%2
         }
     }
 
-
     @Test public void update1() {
         FusekiServer server = server();
         String serviceURL = server.datasetURL(DS);

Reply via email to