<div dir="ltr"><div dir="ltr" class="gmail_msg">Hi Steve Hu,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Most of Undertow built-in Handlers expects a HttpString to identify which HTTP Method you intent to handle. Indeed, it does not have a PATCH but I do believe you can easily create your own HttpString with something like the sample code bellow:</div><div class="gmail_msg"><br></div><div class="gmail_msg"><span class="inbox-inbox-pl-k" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">public</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre"> </span><span class="inbox-inbox-pl-k" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">static</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre"> </span><span class="inbox-inbox-pl-k" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">final</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre"> </span><span class="inbox-inbox-pl-smi" style="box-sizing:border-box;color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">HttpString</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre"> </span><span class="inbox-inbox-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">PATCH</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre"> </span><span class="inbox-inbox-pl-k" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">=</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre"> </span><span class="inbox-inbox-pl-k" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">new</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre"> </span><span class="inbox-inbox-pl-smi" style="box-sizing:border-box;color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">HttpString</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">(</span><span class="inbox-inbox-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">&quot;PATCH&quot;</span><span style="color:rgb(51,51,51);font-family:consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre">);</span><br></div></div><div><br></div>Also, you can create your own handler, if none of available Handlers fit your needs. It is quite easy... Feel free to e-mail me if you need some help with it.<div><br></div><div><div class="gmail_quote gmail_msg"><div class="gmail_msg">Regards,<br></div><div dir="ltr" class="gmail_msg"><br></div><div dir="ltr" class="gmail_msg">On Mon, Oct 3, 2016 at 9:21 AM Steve Hu &lt;<a href="mailto:stevehu@gmail.com" class="gmail_msg" target="_blank">stevehu@gmail.com</a>&gt; wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Hi Tomaz,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Thanks for the quick response. The reason I said undertow doesn&#39;t support PATCH is based on this file.</div><div class="gmail_msg"><a href="https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io/undertow/util/Methods.java" class="gmail_msg" target="_blank">https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io/undertow/util/Methods.java</a><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">As you can see there is no patch method available and I even searched the entire source tree with patch keyword.</div></div><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Steve</div></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Mon, Oct 3, 2016 at 7:41 AM, Tomaž Cerar <span dir="ltr" class="gmail_msg">&lt;<a href="mailto:tomaz.cerar@gmail.com" class="gmail_msg" target="_blank">tomaz.cerar@gmail.com</a>&gt;</span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">Undertow as server supports all http methods.<br class="gmail_msg"></div>It is up to handlers in handler chain that might choose not to support some methods.<br class="gmail_msg"></div>I would look into your handler chain configuration to see which one is not handling PATCH properly.<br class="gmail_msg"><br class="gmail_msg">--<br class="gmail_msg"></div>tomaz<br class="gmail_msg"></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"><span class="gmail_msg">On Sun, Oct 2, 2016 at 9:50 PM, Steve Hu <span dir="ltr" class="gmail_msg">&lt;<a href="mailto:stevehu@gmail.com" class="gmail_msg" target="_blank">stevehu@gmail.com</a>&gt;</span> wrote:<br class="gmail_msg"></span><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="gmail_msg"><div dir="ltr" class="gmail_msg">I am building a REST API framework on top of undertow core to support design driven implementation from Open API (Swagger) specifications for security and validation during runtime. From swagger-codegen result, I found that undertow doesn&#39;t support http method PATCH. Is there a reason it is not supported? or any workaround? Thanks. <div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><a href="https://github.com/networknt/undertow-server" class="gmail_msg" target="_blank">https://github.com/networknt/undertow-server</a><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div></div>
<br class="gmail_msg"></span>_______________________________________________<br class="gmail_msg">
undertow-dev mailing list<br class="gmail_msg">
<a href="mailto:undertow-dev@lists.jboss.org" class="gmail_msg" target="_blank">undertow-dev@lists.jboss.org</a><br class="gmail_msg">
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br class="gmail_msg"></blockquote></div><br class="gmail_msg"></div>
</blockquote></div><br class="gmail_msg"></div>
_______________________________________________<br class="gmail_msg">
undertow-dev mailing list<br class="gmail_msg">
<a href="mailto:undertow-dev@lists.jboss.org" class="gmail_msg" target="_blank">undertow-dev@lists.jboss.org</a><br class="gmail_msg">
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a></blockquote></div></div></div>