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,
kotlin.jvm.functions.Function1<? super ws.osiris.core.ApiBuilder<T>,kotlin.Unit> body) |
void |
cors(kotlin.jvm.functions.Function2<? super ws.osiris.core.CorsHeadersBuilder<T>,? super ws.osiris.core.Request,kotlin.Unit> corsHandler) |
void |
delete(java.lang.String path,
java.lang.Boolean cors,
kotlin.jvm.functions.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,
kotlin.jvm.functions.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(kotlin.jvm.functions.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,
kotlin.jvm.functions.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,
kotlin.jvm.functions.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,
kotlin.jvm.functions.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,
kotlin.jvm.functions.Function1<? super ws.osiris.core.ApiBuilder<T>,kotlin.Unit> body) |
void |
post(java.lang.String path,
java.lang.Boolean cors,
kotlin.jvm.functions.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,
kotlin.jvm.functions.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(kotlin.jvm.functions.Function1<? super ws.osiris.core.StaticFilesBuilder,kotlin.Unit> body) |
void |
update(java.lang.String path,
java.lang.Boolean cors,
kotlin.jvm.functions.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(@NotNull
java.lang.String path,
@Nullable
java.lang.Boolean cors,
@NotNull
kotlin.jvm.functions.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(@NotNull
java.lang.String path,
@Nullable
java.lang.Boolean cors,
@NotNull
kotlin.jvm.functions.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(@NotNull
java.lang.String path,
@Nullable
java.lang.Boolean cors,
@NotNull
kotlin.jvm.functions.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(@NotNull
java.lang.String path,
@Nullable
java.lang.Boolean cors,
@NotNull
kotlin.jvm.functions.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(@NotNull
java.lang.String path,
@NotNull
kotlin.jvm.functions.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(@NotNull
java.lang.String path,
@Nullable
java.lang.Boolean cors,
@NotNull
kotlin.jvm.functions.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(@NotNull
java.lang.String path,
@Nullable
java.lang.Boolean cors,
@NotNull
kotlin.jvm.functions.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(@NotNull
java.lang.String path,
@NotNull
kotlin.jvm.functions.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(@NotNull
kotlin.jvm.functions.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(@NotNull
java.lang.String path,
@NotNull
kotlin.jvm.functions.Function1<? super ws.osiris.core.ApiBuilder<T>,kotlin.Unit> body)
public void auth(@NotNull
Auth auth,
@NotNull
kotlin.jvm.functions.Function1<? super ws.osiris.core.ApiBuilder<T>,kotlin.Unit> body)
public void staticFiles(@NotNull
kotlin.jvm.functions.Function1<? super ws.osiris.core.StaticFilesBuilder,kotlin.Unit> body)
public void cors(@NotNull
kotlin.jvm.functions.Function2<? super ws.osiris.core.CorsHeadersBuilder<T>,? super ws.osiris.core.Request,kotlin.Unit> corsHandler)