mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
🐛 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:
parent
d26cc64163
commit
1727b4626b
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue