MCPcopy Create free account
hub / github.com/BaseXdb/basex / uri

Method uri

basex-core/src/main/java/org/basex/util/http/Client.java:108–117  ·  view source on GitHub ↗

Returns a URI. @param href URL to send the request to (can be empty string) @param request request @return URI @throws QueryException query exception

(final byte[] href, final Request request)

Source from the content-addressed store, hash-verified

106 * @throws QueryException query exception
107 */
108 private URI uri(final byte[] href, final Request request) throws QueryException {
109 final String uri = href.length == 0 ? request.attribute(HREF) : Token.string(href);
110 if(uri == null || uri.isEmpty()) throw HC_URL.get(info);
111 try {
112 return new URI(IOUrl.toAscii(uri));
113 } catch(final URISyntaxException ex) {
114 Util.debug(ex);
115 throw HC_URI_X.get(info, uri);
116 }
117 }
118
119 /**
120 * Returns an HTTP response for the specified request.

Callers 1

sendRequestMethod · 0.95

Calls 6

stringMethod · 0.95
toAsciiMethod · 0.95
debugMethod · 0.95
getMethod · 0.65
attributeMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected