1
0

More than 1 year has passed since last update.

DELETE APIにBodyが必要な時の実装方法

Posted at

初めに

今回、自分が地味に詰まったDELETE APIを叩く時にBodyが必要な時の実装方法を紹介していこうと思います

本文

早速ですが、実装方法は下記の通りになります

@HTTP(method = "DELETE", path = "api_path", hasBody = true)

DELETEオプションはリクエストの本文が存在しないため、URLのみで識別できる必要があります
そのため普段の@DELETEのみでは実装ができなくなってしまっているのです

最後に

調べれば意外と出てきますが、日本語での記事がなく初心者エンジニア等が気付かない可能性があるので今回書かせていただきました
何かのお役に立てれば幸いです

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0