MCPcopy Create free account
hub / github.com/apache/httpd / post_name

Method post_name

test/pyhttpd/nghttp.py:247–260  ·  view source on GitHub ↗
(self, url, name, timeout=5, options=None)

Source from the content-addressed store, hash-verified

245 return self._raw(url, timeout, options)
246
247 def post_name(self, url, name, timeout=5, options=None):
248 reqbody = ("%s/nghttp.req.body" % self.TMP_DIR)
249 with open(reqbody, 'w') as f:
250 f.write("--DSAJKcd9876\r\n")
251 f.write("Content-Disposition: form-data; name=\"value\"; filename=\"xxxxx\"\r\n")
252 f.write("Content-Type: text/plain\r\n")
253 f.write(f"\r\n{name}")
254 f.write("\r\n--DSAJKcd9876\r\n")
255 if not options:
256 options = []
257 options.extend([
258 "--data=%s" % reqbody,
259 "-HContent-Type: multipart/form-data; boundary=DSAJKcd9876"])
260 return self._raw(url, timeout, options)
261
262 def upload(self, url, fpath, timeout=5, options=None):
263 if not options:

Callers 2

test_h2_202_03bMethod · 0.80
test_h2_202_04Method · 0.80

Calls 1

_rawMethod · 0.95

Tested by 2

test_h2_202_03bMethod · 0.64
test_h2_202_04Method · 0.64