Skip to content

Conversation

@r4m-juan
Copy link
Collaborator

…3, GetOrdersByCustomFields, OrdersManager, PickupDropoffJoint, RoutingManager, TelematicsGetVendorInfo, TelematicsManager

…3, GetOrdersByCustomFields, OrdersManager, PickupDropoffJoint, RoutingManager, TelematicsGetVendorInfo, TelematicsManager
Copy link
Collaborator Author

@r4m-juan r4m-juan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@r4m-cristianv Please check my comments


try {
DataObject responseObject = manager.runOptimization(optParameters);
DataObject responseObject = manager.runOptimizationWithRedirect0(optParameters);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@r4m-cristianv

This is not needed we have this method:

public RoutingManager(String apiKey, boolean disableRedirects) {
    super(apiKey, disableRedirects);
}

to disabled redirects

https://github.com/route4me/route4me-java-sdk/blob/008e6a9e0c59899a8a3c7102d3cf9e46ba27552c/src/main/java/com/route4me/sdk/services/routing/RoutingManager.java#L48C1-L50C6

When that method is used we do this:

        if (this.disableRedirects) {
            builder.addParameter("redirect", "0");
            client = HttpClients.custom().disableRedirectHandling().build();
        }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right, I missed this

try {
TelematicsVendorsInfo vendor = manager.getTelematicsVendorInfo("3");
System.out.println(vendor.getVendor());
TelematicsVendorInfo vendor = manager.getTelematicsVendorInfo("3", "62f6197505da3f545c4fc9cb87ae76c9");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@r4m-cristianv Why you added this uuid key here

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting unauthorized access error, that is why I added this api token, but now I double checked and the test passed without api token, so I removed it

return this.makeJSONRequest(RequestMethod.POST, builder, parameters, DataObject.class);
}

public DataObject runOptimizationWithRedirect0(OptimizationParameters parameters) throws APIException {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed @r4m-cristianv

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants