rest-client / rest-client

Simple HTTP and REST client for Ruby, inspired by microframework syntax for specifying actions.

Home Page:https://rubydoc.info/github/rest-client/rest-client/master

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rest client delete_if error

mujohn26 opened this issue · comments

Hi all, I'm trying to use the rest clients to make an HTTP request on the auth0 request but I'm getting an undefined delete_if error message.

How I'm implementing this.

` user_data = {}

headers = {
    Authentication: Bearer token,
    'Content-Type':'application/json',
    'Access-Control-Allow-Origin': '*'
  }
 RestClient.post(domain, user_data.to_json, headers.to_json)`

Hi @mujohn26 did you add content_type: :json?
RestClient.post(domain, user_data.to_json, headers, content_type: :json)