I’m in the process of writing a package for scraping a particular API (see here) and I am getting “Possible method call error” for two types of calls.
The first is when calling
parse from the
JSON package (the API response is always a JSON object). Possibly related: If I hover the mouse over
parse I get the help for the
function parseresponse(response::HTTP.Messages.Response) bod = response.body ret_dict = JSON.parse(String(bod)) # <- Possible method call error return ret_dict end
The second type is when I quote a request and then try to
eval it. I do this because I want to run the request, get the response and then based on the response code do something (i.e. wait until the next minute if the rate limit is hit) and then retry the same request:
function eval_example(url, header) req = :(HTTP.request("GET", $url, $header, status_exception = false)) resp = eval(req) # <- Possible method call error return resp end
Any ideas how I could resolve those?