local-ch / lhc

🚀 Advanced HTTP Client for Ruby. Fueled with interceptors.
GNU General Public License v3.0
43 stars 1 forks source link

Body authentication #181

Closed 10xSebastian closed 4 years ago

10xSebastian commented 4 years ago
Body Authentication
  LHC.post('http://local.ch', auth: { body: { userToken: 'dheur5hrk3' } })

Adds the following to body of all requests:

  {
    "userToken": "dheur5hrk3"
  }
10xSebastian commented 4 years ago

It's not fixed to "userToken". Anything you pass to body: will be merged with the body.