Return code do not work

That was recommended way but perhaps You can create a variable to store the result and then return that variable in another method.

String myResult = null;

public void DoReq(){
    // your code for http request
    myResult = result;
}

@SimpleFunction
public String ReturnResult(){
    DoReq();
    if (myResult != null){
        return myResult;
    } else {
        return "something";
    }
    
}