Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect example documentation #703

Open
6 tasks done
aaronatbissell opened this issue Dec 8, 2023 · 0 comments
Open
6 tasks done

Incorrect example documentation #703

aaronatbissell opened this issue Dec 8, 2023 · 0 comments
Labels
bug This points to a verified bug in the code

Comments

@aaronatbissell
Copy link

Checklist

Description

The example documentation for setting request headers is incorrect. The example code shows incorrect Java syntax.

Map<String, String> defaultHeaders = new HashMap<>();
defaultHeaders.put("{HEADER-NAME}", "{HEADER-VALUE}");

DefaultClient netClient = new DefaultClient(
    defaultHeaders = defaultHeaders
);
Auth0 account = new Auth0("client id", "domain");
account.networkingClient = netClient;

should probably be

Map<String, String> defaultHeaders = new HashMap<>();
defaultHeaders.put("{HEADER-NAME}", "{HEADER-VALUE}");
DefaultClient netClient = new DefaultClient(10, 10, defaultHeaders, false); // <-- This needs to take all the parameters unless we use the @JvmOverloads tag
Auth0 account = new Auth0("client id", "domain");
account.setNetworkingClient(netClient); // <-- need to use the getter/setter generation here unless we use the @JvmField tag in the source code

I'm assuming this probably isn't the only case where this is incorrect.

Reproduction

Look at the example documentation

Additional context

No response

Auth0.Android version

N/A

Android version(s)

N/A

@aaronatbissell aaronatbissell added the bug This points to a verified bug in the code label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

1 participant