初めに
今回、自分が地味に詰まったDELETE APIを叩く時にBodyが必要な時の実装方法を紹介していこうと思います
本文
早速ですが、実装方法は下記の通りになります
@HTTP(method = "DELETE", path = "api_path", hasBody = true)
DELETEオプションはリクエストの本文が存在しないため、URLのみで識別できる必要があります
そのため普段の@DELETEのみでは実装ができなくなってしまっているのです
最後に
調べれば意外と出てきますが、日本語での記事がなく初心者エンジニア等が気付かない可能性があるので今回書かせていただきました
何かのお役に立てれば幸いです