Loop body: open <header>
189531
private function openHeader(Post $post, int $count): string
    {
        if (!$this->postInfo('title', 'before', $post, $count)
            && !$this->title($post, $count)
            && !$this->postInfo('title', 'after', $post, $count)
        ) {
            return '';
        }

        return '<header'.(
            'top' === $this->posts->args['title']['position']
            ? '' : $this->textOffset($post)
        ).'>';
    }
243763
public static void processHeaders(Map<String, List<String>> headers, HttpServletResponse res) {

        if (headers != null) {
            Iterator<Map.Entry<String, List<String>>> i = headers.entrySet().iterator();
            while (i.hasNext()) {
                Map.Entry<String, List<String>> entry = i.next();
                String key = entry.getKey();
                List<String> l = entry.getValue();
                for (int j = 0; j < l.size(); j++) {
                    if ((j == 0) && ((l.get(0)).startsWith(SET_HEADER))) {
                        String s = l.get(0);
                        res.setHeader(key, s.substring(SET_HEADER.length()));
                    } else {
                        res.addHeader(key, l.get(j));
                    }
                }
            }
        }
    }
304765
private static String doRequestWithBody(String url, String method, Map<String, String> header, String ctype, byte[] content, int connectTimeout, int readTimeout) throws IOException {
    HttpURLConnection conn = null;
    OutputStream out = null;
    String rsp = null;
    try {
      try {
        conn = getConnection(new URL(url), method, header, ctype);
        conn.setConnectTimeout(connectTimeout);
        conn.setReadTimeout(readTimeout);
      } catch (IOException e) {
        throw e;
      }
      try {
        out = conn.getOutputStream();
        out.write(content);
        rsp = getResponseAsString(conn);
      } catch (IOException e) {
        throw e;
      }

    } finally {
      if (out != null) {
        out.close();
      }
      if (conn != null) {
        conn.disconnect();
      }
    }
    return rsp;
  }
1288614
def body_echo(cls, request,
                  foo: (Ptypes.body, String('A body parameter'))) -> [
            (200, 'Ok', String)]:
        ''''''
        log.info('Echoing body param, value is: {}'.format(foo))
        for i in range(randint(0, MAX_LOOP_DURATION)):
            yield
        msg = 'The value sent was: {}'.format(foo)
        Respond(200, msg)
231776
function addTbodyOrTheadIfNeed(tableData) {
  const [header] = tableData;
  const cellCount = header.length;
  let added = true;

  if (!cellCount && tableData[1]) {
    util.range(0, tableData[1].length).forEach(colIndex => {
      header.push(createBasicCell(0, colIndex, 'TH'));
    });
  } else if (tableData[0][0].nodeName !== 'TH') {
    const newHeader = util.range(0, cellCount).map(colIndex => createBasicCell(0, colIndex, 'TH'));

    [].concat(...tableData).forEach(cellData => {
      if (cellData.elementIndex) {
        cellData.elementIndex.rowIndex += 1;
      }
    });

    tableData.unshift(newHeader);
  } else if (tableData.length === 1) {
    const newRow = util.range(0, cellCount).map(colIndex => (
      createBasicCell(1, colIndex, 'TD')
    ));

    tableData.push(newRow);
  } else {
    added = false;
  }

  return added;
}
564309
function processBody(opts, body) {
  if (body === undefined) {
    return '';
  }
  const handlers = Object.assign({}, serializers, opts.serializers);
  const headers = typeof opts.headers === 'object' ? opts.headers : {};
  const contentType = Object.keys(headers).reduce((type, header) => {
    if (typeof type === 'string') {
      return type;
    }
    if (
      header.match(/^content-type$/i) &&
      typeof headers[header] === 'string'
    ) {
      return headers[header].toLowerCase();
    }
    return type;
  }, undefined);

  const handler = handlers[contentType];

  if (typeof handler === 'function') {
    return String(handler(body));
  }
  if (typeof body === 'object') {
    return JSON.stringify(body);
  }
  return String(body);
}
799507
public void setHead(String[] head) {

        iColCount = head.length;
        sColHead  = new String[iColCount];
        iColWidth = new int[iColCount];

        for (int i = 0; i < iColCount; i++) {
            sColHead[i]  = head[i];
            iColWidth[i] = 100;
        }

        iRowCount  = 0;
        iRowHeight = 0;
        vData      = new Vector();
    }
10264
public void readHeaderTo(OutputStream os) throws IOException {
        position = 0;
        byte[] buf = new byte[(int)responseBodyStart];
        int c = read(buf,0,buf.length);
        if(c != -1) {
            os.write(buf,0,c);
        }
    }
227611
def body(self, data):
        """"""
        if data is not None:
            self._body = data
            self.add_header('Content-Length', str(len(self._body)))
408688
function httpOk(response,isHead,body) {
  response.setHeader(HTTP_CONTENT_TYPE,MIME_TYPE_JAVASCRIPT);
  response.setHeader(HTTP_CONTENT_LENGTH,body.length);
  response.statusCode = HTTP_OK;
  if (isHead) response.end();
  else response.end(body);
}
491445
def open_multi(cls, sock, chunk_types, isattys, chunk_eof_type=None, buf_size=None,
                 select_timeout=None):
    """"""
    cls._assert_aligned(chunk_types, isattys)

    # N.B. This is purely to permit safe handling of a dynamic number of contextmanagers.
    with ExitStack() as stack:
      read_fds, write_fds = list(zip(
        # Allocate one pipe pair per chunk type provided.
        *(stack.enter_context(_pipe(isatty)) for isatty in isattys)
      ))
      writer = NailgunStreamWriter(
        read_fds,
        sock,
        chunk_types,
        chunk_eof_type,
        buf_size=buf_size,
        select_timeout=select_timeout
      )
      with writer.running():
        yield write_fds, writer
673555
def header(self, array):
        

        self._check_row_size(array)
        self._header = list(map(obj2unicode, array))
        return self
1309079
function open(method, url, async, username, password) {
    this.method = method;
    this.url = url;
    this.async = typeof async == "boolean" ? async : true;
    this.username = username;
    this.password = password;
    this.responseText = null;
    this.responseXML = null;
    this.responseURL = url;
    this.requestHeaders = {};
    this.sendFlag = false;
    this._readyStateChange(FakeXMLHttpRequest.OPENED);
  }
1018216
def write_header(self):
        

        self.output.seek(0)
        self.output.write(struct.pack('!HHHHHH', self.id, self.flags,
                                      self.counts[0], self.counts[1],
                                      self.counts[2], self.counts[3]))
        self.output.seek(0, 2)
890502
function setHeadersFromObject (res, headers) {
  var keys = Object.keys(headers)
  for (var i = 0; i < keys.length; i++) {
    var k = keys[i]
    if (k) res.setHeader(k, headers[k])
  }
}
145383
def emit_body(body = body())
      unless body
        buffer.indent
        nl
        buffer.unindent
        return
      end
      visit_indented(body)
    end
442807
public T header(String title, Iterable<HtmlResource> resources) throws IOException {
		return (T) begin("html")
			.begin("head")
			.begin("title").text("Simon Console: ").text(title).end("title")
			.resources(resources)
			.end("head")
			.begin("body")
			.begin("h1")
			.write("<img id=\"logo\" src=\"../resource/images/logo.png\" alt=\"Logo\" />")
			.text("Simon Console: ").text(title)
			.end("h1");
	}