Files
reverse-engineering-anything/tests
pedrocormannandClaude Opus 5.5 73bc6f48c7 fix(javascript): read the target of method-first request(method, url) calls
endpointArgument takes the first literal of a get/post/put/patch/delete/request
call as its endpoint candidate. Method-first clients (superagent's
request(method, url), needle.request, Angular HttpClient.request) put the HTTP
method there, so Api.request("get", "/api/v1/profile") reported the candidate
"get" in both analyze_javascript_application and analyze_web_bundle, and the
path was lost.

For a request callee whose first literal is a standard HTTP method (the
XHR_METHODS set that xhrOpenUrl uses, compared after toUpperCase), an exact
second string is now the candidate. A computed target keeps the method token,
so request("POST", target) is unchanged, as are RPC names, Octokit route
strings and URL-first calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 22:29:49 +01:00
..