Skip to content

Method FormatUrl with Api Gateway #398

@douglasbcosta

Description

@douglasbcosta

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions