OK so, I'm using RestClient and sending this:
{"x_select_params":["account.*"],"domain":"thedomain"}
Via
response = RestClient.get servername, @payload
And I get
undefined method `delete_if' for #<String:0x4b699a8>
In response.
I know that the request is good as it works fine when I use the Chrome rest client extension, I'm thinking that RestClient is having an issue in parsing the response, which is supposed to look like this:
{
"user": {
"id": 4035,
"first_name": "Chris",
"last_name": "Penta",
"status": "PENDING",
"domain": "thedomain",
"default_account_id": 111315004004010,
"primary_alias_id": 131090,
"accounts": [
{
"id": 111315004004010,
"urn": "111315004004010",
"balance": 0,
"status": 0,
"currency_code": 840
}
]
}
}
Is this a bug in RestClient that needs patching? And if so, anyone know how to fix?
Thanks...Chris
I found this error when the headers were in a json format. They needed to be a hash to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With