README.md in flexirest-1.3.12 vs README.md in flexirest-1.3.13
- old
+ new
@@ -623,11 +623,11 @@
```ruby
Person.all(param: [1, 2, 3])
```
-Ruby would encode the url as
+Ruby would encode the url as
```
?param[]=1¶m[]=2¶m[]=3
```
@@ -685,9 +685,17 @@
Person._plain_request('http://api.example.com/v1/people', :post, {id:1234,name:"John"}) # Post with parameters
```
The parameters are the same as for `_request`, but it does no parsing on the response
+
+You can also bypass the response parsing using a mapped method like this:
+
+```ruby
+class Person < Flexirest::Base
+ get :all, "/v1/people", plain: true
+end
+```
### Proxying APIs
Sometimes you may be working with an old API that returns JSON in a less than ideal format or the URL or parameters required have changed. In this case you can define a descendent of `Flexirest::ProxyBase`, pass it to your model as the proxy and have it rework URLs/parameters on the way out and the response on the way back in (already converted to a Ruby hash/array). By default any non-proxied URLs are just passed through to the underlying connection layer. For example: