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

Method FormatUrl with Api Gateway #398

Open
douglasbcosta opened this issue May 14, 2021 · 0 comments
Open

Method FormatUrl with Api Gateway #398

douglasbcosta opened this issue May 14, 2021 · 0 comments

Comments

@douglasbcosta
Copy link

Here I have an API Gateway before access salesforce, wich makes a query calling something like {baseUrl}/{path}/services/data/...
I found that if I try to set the InstanceUrl like {baseUrl}/{path} it wont work because of method FormatUrl called in ForceClient wont get the path. The final url will just be {baseUrl}/services/data/... without the path of Api Gateway.
I had to inhite a new class from IForceClient to substitute just this method.

Instead of using the Common class I wrote a similar method that instead of returning:
new Uri(new Uri(instanceUrl), string.Format("/services/data/{0}/{1}", apiVersion, resourceName));
I return
new Uri("{0}/services/data/{1}/{2}", instanceUrl, apiVersion, resourceName);

The same for the other url formats. As I dont use much other endpoints I dont know the impacts of that in other cases or if it would have an easier way to solve.

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

No branches or pull requests

1 participant