public class ApiBuilder<T extends ComponentsProvider>
This is an internal class that is part of the DSL implementation and should not be used by user code.
| Modifier and Type | Class and Description |
|---|---|
static class |
ApiBuilder.Companion |
| Modifier and Type | Field and Description |
|---|---|
static ApiBuilder.Companion |
Companion |
| Modifier and Type | Method and Description |
|---|---|
void |
auth(Auth auth,
Function1<? super ws.osiris.core.ApiBuilder<T>,Unit> body) |
void |
cors(Function2<? super ws.osiris.core.CorsHeadersBuilder<T>,? super ws.osiris.core.Request,Unit> corsHandler) |
void |
delete(java.lang.String path,
java.lang.Boolean cors,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles DELETE requests to the path.
|
void |
filter(java.lang.String path,
Function3<? super T,? super ws.osiris.core.Request,? super kotlin.jvm.functions.Function2<? super T,? super ws.osiris.core.Request,ws.osiris.core.Response>,? extends java.lang.Object> handler) |
void |
filter(Function3<? super T,? super ws.osiris.core.Request,? super kotlin.jvm.functions.Function2<? super T,? super ws.osiris.core.Request,ws.osiris.core.Response>,? extends java.lang.Object> handler) |
void |
get(java.lang.String path,
java.lang.Boolean cors,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles GET requests to the path.
|
void |
options(java.lang.String path,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles OPTIONS requests to the path.
|
void |
patch(java.lang.String path,
java.lang.Boolean cors,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles PATCH requests to the path.
|
void |
path(java.lang.String path,
java.lang.Boolean cors,
Function1<? super ws.osiris.core.ApiBuilder<T>,Unit> body) |
void |
post(java.lang.String path,
java.lang.Boolean cors,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles POST requests to the path.
|
void |
put(java.lang.String path,
java.lang.Boolean cors,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles PUT requests to the path.
|
void |
staticFiles(Function1<? super ws.osiris.core.StaticFilesBuilder,Unit> body) |
void |
update(java.lang.String path,
java.lang.Boolean cors,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles UPDATE requests to the path.
|
public static ApiBuilder.Companion Companion
public void get(java.lang.String path,
java.lang.Boolean cors,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles GET requests to the path.
public void post(java.lang.String path,
java.lang.Boolean cors,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles POST requests to the path.
public void put(java.lang.String path,
java.lang.Boolean cors,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles PUT requests to the path.
public void update(java.lang.String path,
java.lang.Boolean cors,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles UPDATE requests to the path.
public void options(java.lang.String path,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles OPTIONS requests to the path.
public void patch(java.lang.String path,
java.lang.Boolean cors,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles PATCH requests to the path.
public void delete(java.lang.String path,
java.lang.Boolean cors,
Function2<? super T,? super ws.osiris.core.Request,? extends java.lang.Object> handler)
Defines an endpoint that handles DELETE requests to the path.
public void filter(java.lang.String path,
Function3<? super T,? super ws.osiris.core.Request,? super kotlin.jvm.functions.Function2<? super T,? super ws.osiris.core.Request,ws.osiris.core.Response>,? extends java.lang.Object> handler)
public void filter(Function3<? super T,? super ws.osiris.core.Request,? super kotlin.jvm.functions.Function2<? super T,? super ws.osiris.core.Request,ws.osiris.core.Response>,? extends java.lang.Object> handler)
public void path(java.lang.String path,
java.lang.Boolean cors,
Function1<? super ws.osiris.core.ApiBuilder<T>,Unit> body)
public void auth(Auth auth, Function1<? super ws.osiris.core.ApiBuilder<T>,Unit> body)
public void staticFiles(Function1<? super ws.osiris.core.StaticFilesBuilder,Unit> body)
public void cors(Function2<? super ws.osiris.core.CorsHeadersBuilder<T>,? super ws.osiris.core.Request,Unit> corsHandler)