http/request.go
func WriteRequest(call tchannel.ArgWritable, req *http.Request) error {
	// TODO(prashant): Allow creating write buffers that let you grow the buffer underneath.
	wb := typed.NewWriteBufferWithSize(10000)
	wb.WriteLen8String(req.Method)
	writeVarintString(wb, req.URL.String())
	writeHeaders(wb, req.Header)

	arg2Writer, err := call.Arg2Writer()
	if err != nil {
		return err
	}
	if _, err := wb.FlushTo(arg2Writer); err != nil {
		return err
	}
	if err := arg2Writer.Close(); err != nil {
		return err
	}

	arg3Writer, err := call.Arg3Writer()
	if err != nil {
		return err
	}

	if req.Body != nil {
		if _, err = io.Copy(arg3Writer, req.Body); err != nil {
			return err
		}
	}
	return arg3Writer.Close()
}
func WriteRequest(call tchannel.ArgWritable, req *http.Request) error {
	// TODO(prashant): Allow creating write buffers that let you grow the buffer underneath.
	wb := typed.NewWriteBufferWithSize(10000)
	wb.WriteLen8String(req.Method)
	writeVarintString(wb, req.URL.String())
	writeHeaders(wb, req.Header)

	arg2Writer, err := call.Arg2Writer()
	if err != nil {
		return err
	}
	if _, err := wb.FlushTo(arg2Writer); err != nil {
		return err
	}
	if err := arg2Writer.Close(); err != nil {
		return err
	}

	arg3Writer, err := call.Arg3Writer()
	if err != nil {
		return err
	}

	if req.Body != nil {
		if _, err = io.Copy(arg3Writer, req.Body); err != nil {
			return err
		}
	}
	return arg3Writer.Close()
}
// WriteRequest writes a http.Request to the given writers.