docs/faking-calls.md in flexirest-1.9.16 vs docs/faking-calls.md in flexirest-1.9.17

- old
+ new

@@ -14,9 +14,20 @@ class Person < Flexirest::Base get :all, '/people', fake: ->(request) { {result: request.get_params[:id]} } end ``` +Alternatively, you can specify a symbol as the `fake` parameter, and Flexirest will call that method to get a string JSON as if it was the request body: + +```ruby +class Person < Flexirest::Base + get :all, '/people', fake: :get_data + + def get_data + {result: true}.to_json + end +end +``` ----- [< Parallel requests](parallel-requests.md) | [Per-request timeouts >](per-request-timeouts.md)