MCPcopy
hub / github.com/ternjs/tern_for_vim / tern_makeRequest

Function tern_makeRequest

script/tern.py:9–16  ·  view source on GitHub ↗
(port, doc)

Source from the content-addressed store, hash-verified

7 vim.command("echo " + json.dumps(str(err)))
8
9def tern_makeRequest(port, doc):
10 try:
11 req = opener.open("http://localhost:" + str(port) + "/", json.dumps(doc),
12 float(vim.eval("g:tern_request_timeout")))
13 return json.loads(req.read())
14 except urllib2.HTTPError, error:
15 tern_displayError(error.read())
16 return None
17
18# Prefixed with _ to influence destruction order. See
19# http://docs.python.org/2/reference/datamodel.html#object.__del__

Callers 2

tern_runCommandFunction · 0.85
tern_sendBufferFunction · 0.85

Calls 1

tern_displayErrorFunction · 0.85

Tested by

no test coverage detected