Mercurial > hg > orthanc-book
view Sphinx/source/plugins/java/ExtendingRest.java @ 1093:ad86e352fce1
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 12 Jul 2024 09:40:07 +0200 |
parents | df28170c2af3 |
children |
line wrap: on
line source
import be.uclouvain.orthanc.Callbacks; import be.uclouvain.orthanc.HttpMethod; import be.uclouvain.orthanc.RestOutput; import java.util.Map; public class ExtendingRest { static { Callbacks.register("/java", new Callbacks.OnRestRequest() { @Override public void call(RestOutput output, HttpMethod method, String uri, String[] regularExpressionGroups, Map<String, String> headers, Map<String, String> getParameters, byte[] body) { output.answerBuffer("Hello from Java!\n".getBytes(), "text/plain"); } }); } }