🐛 Fix possible request problem on Salesforce-Node (#894)

As mentioned in this [doc](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_query.htm), sfdc use query string to represent a SOQL query. It may get error response in some environment if we provide the body param such as sandbox env.
This commit is contained in:
YErii 2020-08-27 14:23:02 +08:00 committed by GitHub
parent d26cc64163
commit 1727b4626b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@ export async function salesforceApiRequest(this: IExecuteFunctions | IExecuteSin
const subdomain = ((credentials!.accessTokenUrl as string).match(/https:\/\/(.+).salesforce\.com/) || [])[1]
const options: OptionsWithUri = {
method,
body,
body: method === "GET" ? undefined : body,
qs,
uri: uri || `https://${subdomain}.salesforce.com/services/data/v39.0${resource}`,
json: true