What problem does it solve?
When exposing Golem agents over HTTP, developers need to know exactly how path variables, query parameters, headers, and request bodies map to Scala constructor and method parameters, and which types are allowed in each position. This Skill removes the guesswork and prevents runtime binding and JSON parsing errors.
Core Features & Use Cases
- Path and Query Mapping: Explains how
{varName} path segments, catch-all {*path} variables, and ?key={var} query parameters bind to method parameters by name.
- Header and Body Binding: Covers the
@header annotation for header mapping and the rule that unmapped POST/PUT/DELETE parameters come from a JSON object body keyed by parameter name.
- Type Support Tables: Lists supported types for path/query/header values (String, Boolean, Int, Long, Float, Double, enums, plus Option and List for query/header only) and the return-type-to-HTTP-status mapping (Unit → 204, Option → 200/404).
- Use Case: You are defining a Scala agent endpoint
def search(query: String, n: Int) and need to confirm the correct @endpoint path syntax and that Int is parsed from the query string.
Quick Start
Ask how to map a path variable, query parameter, header, or JSON body field to a Scala agent endpoint parameter in Golem.