* <a href="https://www.rfc-editor.org/rfc/rfc8040#section-3.6">RFC8040 Operation Resource</a>.
*
* @param request {@link ServerRequest} for this request
- * @param restconfURI Base URI of the request
+ * @param restconfURI Base URI of the request, the absolute equivalent to {@code {+restconf}} URI with a trailing
+ * slash
* @param operation {@code <operation>} path, really an {@link ApiPath} to an {@code rpc}
* @param body RPC operation
* @return A {@link RestconfFuture} completing with {@link InvokeResult}
/**
* Return the base location URL of the streams service based on request URI.
*
- * @param restconfURI request base URI
+ * @param restconfURI request base URI, with trailing slash
* @throws IllegalArgumentException if the result would have been malformed
*/
protected final @NonNull String baseStreamLocation(final URI restconfURI) {
try {
return new URI(scheme, restconfURI.getRawUserInfo(), restconfURI.getHost(), restconfURI.getPort(),
- restconfURI.getPath() + '/' + URLConstants.STREAMS_SUBPATH, null, null)
+ restconfURI.getPath() + URLConstants.STREAMS_SUBPATH, null, null)
.toString();
} catch (URISyntaxException e) {
throw new IllegalArgumentException("Cannot derive streams location", e);
@ExtendWith(MockitoExtension.class)
class CreateNotificationStreamRpcTest {
private static final EffectiveModelContext SCHEMA_CTX = YangParserTestUtils.parseYangResourceDirectory("/streams");
- private static final URI RESTCONF_URI = URI.create("/rests");
+ private static final URI RESTCONF_URI = URI.create("/rests/");
private static final YangInstanceIdentifier TOASTER = YangInstanceIdentifier.of(
QName.create("http://netconfcentral.org/ns/toaster", "2009-11-20", "toaster"));