blob: 7bdecf73d0de382ac4d92ad98a36fd338fcfbe66 [file] [log] [blame]
<!--
/***************************************************************************************************************************
* 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.
***************************************************************************************************************************/
-->
Built-in Parameters
<p>
The following URL parameters have special meaning and can be passed in through the URL of the request:
</p>
<table class='styled w800'>
<tr>
<th><l>GET Parameter</l></th>
<th><l>Description</l></th>
</tr>
<tr>
<td class='code'>&amp;plainText=true</td>
<td>
Response will always be <l>Content-Type: text/plain</l> and the returned text will be human-readable
({@link oaj.serializer.WriterSerializer#WSERIALIZER_useWhitespace WSERIALIZER_useWhitespace} enabled).
<br>Useful for debugging.
</td>
</tr>
<tr>
<td class='code'>&amp;debug=true</td>
<td>
Request body content will be dumped to log file.
</td>
</tr>
<tr>
<td class='code'>&amp;noTrace=true</td>
<td>
If an error occurs, don't log the stack trace to the log file.
<br>Useful for automated JUnit testcases testing error states to prevent the log file from filling
up with useless stack traces.
</td>
</tr>
<tr>
<td class='code'>&amp;method=X</td>
<td>
Overload the HTTP method as a GET parameter (e.g <l>"POST"</l>).
<br>Must be enabled via {@link oajr.annotation.Rest#allowedMethodParams() @Rest(allowedMethodParams)} setting.
</td>
</tr>
<tr>
<td class='code'>&amp;Header-Name=headerValue</td>
<td>
Specify a header value as a GET parameter.
<br>Must be enabled via {@link oajr.annotation.Rest#allowedHeaderParams() @Rest(allowedHeaderParams)} setting.
</td>
</tr>
<tr>
<td class='code'>&amp;body=X</td>
<td>
Pass in the HTTP body content on PUT and POST methods as a UON-encoded GET parameter.
<br>Must be enabled via {@link oajr.annotation.Rest#allowBodyParam() @Rest(allowBodyParam)} setting.
</td>
</tr>
<tr>
<td class='code'>&amp;x-response-headers=X</td>
<td>
Pass-through headers to the response.
<br>Must be a UON-encoded map of key-value pairs.
</td>
</tr>
</table>