Currently using the Box Guide "Authenticate with OAuth 2" with java
import org.bouncycastle.math.ec.ECCurve.Config;
import zero**removed**.config;
import com.box.sdk.BoxAPIConnection;
import com.box.sdk.BoxFolder;
import com.box.sdk.BoxItem;
public class auth {
public static void main(String[] args) {
// TODO Auto-generated method stub
// Redirect user to login with Box
String box_redirect = config.box_redirect
+ "?response_type=code"
+ "&client_id=" + config.client_id
+ "&redirect_uri=" + config.redirect_uri;
res.redirect(box_redirect); //res cannot be resolved
get("/return", (req, res) -> { //method not applicable for given arguments
// Capture auth code
String code = req.queryParams("code");
// Instantiate new Box API connection object
BoxAPIConnection client = new BoxAPIConnection(Config.client_id, Config.client_secret, code);
// PERFORM API ACTIONS WITH CLIENT
});
}
}
}What does res stand for and how are the arguments for the get method defined.
beginner friendly answer please
thanks in advance and kind regards