curl or js ?