Files
graphify/tests/fixtures/sample.scala
T
Safi 81a43f028f feat: 13-language AST support and token benchmark
Java, C, C++, Ruby, C#, Kotlin, Scala, PHP via tree-sitter (13 total)
benchmark.py measures BFS subgraph tokens vs corpus tokens
5 skill bug fixes (cohesion crash, dead step, missing MCP tool)
2026-04-04 18:56:38 +01:00

24 lines
520 B
Scala

import scala.collection.mutable.ListBuffer
case class Config(baseUrl: String, timeout: Int)
class HttpClient(config: Config) {
def get(path: String): String = {
buildRequest("GET", path)
}
def post(path: String, body: String): String = {
buildRequest("POST", path)
}
private def buildRequest(method: String, path: String): String = {
s"$method ${config.baseUrl}$path"
}
}
object HttpClientFactory {
def create(baseUrl: String): HttpClient = {
new HttpClient(Config(baseUrl, 30))
}
}