Build URL string

Build URL string in JavaScript — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
Construct the full API URL for the product search endpoint. Start from baseApi =…
Construct the full API URL for the product search endpoint. Start from baseApi = https://api.internal.company.com/v1, append /products/search, add the q query with the searchTerm string, limit set to 25, and include the category if categoryId is a non-empty string. Ensure all query values are URL-encoded and return the final URL string.

Improve — make it easier to accept

+
Before I hand the URL to the network team, make the important bits obvious: show the base, path,…
Before I hand the URL to the network team, make the important bits obvious: show the base, path, each query key with its raw and encoded value, and highlight when the final URL exceeds 2048 characters. Flag missing searchTerm or an invalid categoryId format and propose the minimal change so a reviewer can approve without question.

Decide — diagnose the stuck moment

+
Our product search occasionally triggers 414 when users paste very long filters into the q…

Search requests sometimes return 414 URI Too Long

Our product search occasionally triggers 414 when users paste very long filters into the q parameter. I build the URL by concatenating encoded parameters. I do not know whether to move to POST, truncate, or compress parameters. Given a public search box and occasional long queries, what is the likely best next move and the tradeoffs I should explain to the product manager?

Become — change the pattern

+
I keep patching URL construction code in multiple repos: different encoding functions, inconsistent…

Wasting time fixing ad-hoc URL builders across codebase

I keep patching URL construction code in multiple repos: different encoding functions, inconsistent parameter ordering, and scattered logic for optional params. It causes bugs and code review churn. What one pattern or shared utility should I introduce so future URL strings are correct and reviewers stop catching the same mistakes?

Next to this one

Other programming language work people do in JavaScript.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.