Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locations missing Route.delete method #288

Closed
brezinajn opened this issue Jan 10, 2018 · 0 comments
Closed

Locations missing Route.delete method #288

brezinajn opened this issue Jan 10, 2018 · 0 comments

Comments

@brezinajn
Copy link

brezinajn commented Jan 10, 2018

Package io.ktor.locations containts Route extensions get, post, put, patch, etc. but misses delete function.
Workaround for the moment is to create Route.delete extension manually.
Code I use:

inline fun <reified T : Any> Route.delete(noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit): Route {
    return location(T::class) {
        method(HttpMethod.Delete) {
            handle(body)
        }
    }
}
@orangy orangy closed this as completed in 5804141 Jan 29, 2018
schleinzer pushed a commit to schleinzer/ktor that referenced this issue Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant