Package dev.gmitch215.bytebox.binding
Interface Fetcher
- All Superinterfaces:
org.teavm.jso.JSObject
public interface Fetcher
extends org.teavm.jso.JSObject
Anything reachable by sending it a request.
Four bindings are this shape and they differ only in what sits on the other end: a service binding reaches another Worker with no network hop and no charge for the subrequest, an assets binding reaches static files, an mTLS binding reaches an origin using a client certificate, and a Browser Rendering binding reaches a headless browser.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault ResponseSends a request.default ResponseSends a GET to a URL.default ResponseSends a request built from a URL and options.default TSObjectCalls a method the other side exposes over RPC.org.teavm.jso.core.JSPromise<Response> org.teavm.jso.core.JSPromise<Response> org.teavm.jso.core.JSPromise<Response> Methods inherited from interface org.teavm.jso.JSObject
cast
-
Method Details
-
fetch
Sends a request.- Parameters:
request- the request- Returns:
- the response
-
fetch
Sends a GET to a URL.- Parameters:
url- the URL- Returns:
- the response
-
fetch
Sends a request built from a URL and options.- Parameters:
url- the URLoptions-method,headers,body- Returns:
- the response
-
rpc
Calls a method the other side exposes over RPC.Only meaningful for a service binding whose target extends Cloudflare's
WorkerEntrypoint.- Parameters:
method- the method nameargs- the arguments- Returns:
- what the method returned
-
send
-
send
-
send
-