Describe the bug
I am doing a app with json streaming (multiple jsons separated with lines (\n)) and had no way to send it in as params got parsed to json and would not work.
Will give error on method with those params doesn't exist.
By adding these methods in ApiClient, it works:
def exec(action : Lucky::Action.class, body : String) : HTTP::Client::Response
exec(action.route, body)
end
def exec(route_helper : Lucky::RouteHelper, body : String) : HTTP::Client::Response
@client.exec(method: route_helper.method.to_s.upcase, path: route_helper.path, body: body)
end
Expected behavior
Accept sending in a string in the body for testing. My suggestion is to add those methods to be default in the builtin BaseHTTPClient
Versions (please complete the following information):
Describe the bug I am doing a app with json streaming (multiple jsons separated with lines (\n)) and had no way to send it in as params got parsed to json and would not work.
To Reproduce Steps to reproduce the behavior:
Will give error on method with those params doesn't exist.
By adding these methods in ApiClient, it works:
Expected behavior Accept sending in a string in the body for testing. My suggestion is to add those methods to be default in the builtin BaseHTTPClient
Versions (please complete the following information):
crystal --version
): 1.1.0