Mercurial > hg > orthanc-book
view Sphinx/source/plugins/java/ExtendingRest.java @ 1121:f45af556efae Orthanc-1.12.5
Orthanc 1.12.5
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 17 Dec 2024 18:46:02 +0100 |
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"); } }); } }