You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi @teamon - can I configure a different json engine, programmatically? I am porting my projects to 1.0.0-beta.1, but some of them have "hard" dependencies on Poison, so I have to stick with the latter for time being. ty!
Currently to mock a JSON response one has to write:
Since this (and some other) cases are very common it would be useful to have:
or
Also, returning simple
{200, [], "hello"}
tuple instead of fullTesla.Env
might be handy.Right now the proposal is to have:
Tesla.Env => {:ok, Tesla.Env}
{status, headers, body} => {:ok, Tesla.Env{...}}
other => {:error, other}
json(body, opts \\ []) :: Tesla.Env
(status defaults to 200, set proper content type header)text(body, opts \\ []) :: Tesla.Env
(status defaults to 200, set proper content type header)config :tesla, Tesla.Mock, json_engine: Jason
)import Tesla.Mock.Helpers
line)The text was updated successfully, but these errors were encountered: