exceptionfactory commented on code in PR #9842:
URL: https://github.com/apache/nifi/pull/9842#discussion_r2033842681


##########
nifi-commons/nifi-web-client-api/src/main/java/org/apache/nifi/web/client/api/MediaType.java:
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.web.client.api;
+
+public enum MediaType {
+
+    /** RFC 4329 */
+    APPLICATION_JAVASCRIPT("application/javascript"),
+
+    /** RFC 8259 (was RFC 4627) */
+    APPLICATION_JSON("application/json"),
+
+    /** RFC 7303 */
+    APPLICATION_XML("application/xml"),
+
+    /** RFC 2046 */
+    APPLICATION_OCTET_STREAM("application/octet-stream"),
+
+    /** HTML form data (not IANA-registered with a formal RFC) */
+    APPLICATION_X_WWW_FORM_URLENCODED("application/x-www-form-urlencoded"),
+
+    /** RFC 2388 */
+    MULTIPART_FORM_DATA("multipart/form-data"),
+
+    /** RFC 2046 */
+    TEXT_HTML("text/html"),
+
+    /** RFC 4180 (informal, CSV is not formally IANA-registered) */
+    TEXT_CSV("text/csv"),
+
+    /** RFC 2046 */
+    TEXT_PLAIN("text/plain"),
+
+    /** RFC 7303 */
+    TEXT_XML("text/xml");
+
+    private final String contentType;
+
+    MediaType(final String contentType) {
+        this.contentType = contentType;
+    }
+
+    public String getContentType() {
+        return contentType;
+    }

Review Comment:
   Following the enum name, it looks like String should also be named 
`mediaType`:
   ```suggestion
       private final String mediaType;
   
       MediaType(final String mediaType) {
           this.mediaType = mediaType;
       }
   
       public String getMediaType() {
           return mediaType;
       }
   ```



##########
nifi-commons/nifi-web-client-api/src/main/java/org/apache/nifi/web/client/api/HttpHeaderName.java:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.web.client.api;
+

Review Comment:
   Recommend adding a brief comment along the lines of "Enumeration of common 
and registered HTTP request and response header names"



##########
nifi-commons/nifi-web-client-api/src/main/java/org/apache/nifi/web/client/api/MediaType.java:
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.web.client.api;
+

Review Comment:
   Recommend adding a comment: "Enumeration of common and registered Media 
Types"



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to