The curl -w argument in the command echo contains the literal text
'HTTP_CODE:%{http_code}', so raw.find("HTTP_CODE:") hits that first
and cuts search_area off before the actual JSON response body — leaving
data as {}. Switching to rfind targets the real HTTP_CODE:200 output
that curl appends at the end of the response.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>