Forum Discussion

SteveBamford's avatar
SteveBamford
Icon for Neophyte rankNeophyte
2 months ago
Solved

Trouble with setHTTPProxy creating discovery script.

For background I am currently working on onboarding Arista AP's that are managed from the Arista CUE platform, to build the discovery script at least I am using Groovy however when testing the Login ...
  • edward_garza's avatar
    25 days ago

    "setHTTPProxy" is an object method for the instantiated object, which in this case, the instantiated object is "httpClient".

    You need to instantiate the object first, then you can invoke methods on that instantiated object.

    The correct usage would be as follows:

    httpClient = HTTP.open(externalHost,443);   <-- instantiating the "httpClient" object

    httpClient.setHTTPProxy("proxy name",8080);   <--invoking the "setHTTPProxy" object method on the instantiated "httpClient" object