Check out example codes for "how to differentiate get and post when it has same name in rails". It will help you in understanding the concepts better.

Code Example 1

match "user/account" => "user#account", as: :user_account, via: [:get, :post]

Learn ReactJs, React Native from akashmittal.com