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

salesforce add request() function #465

Merged
merged 7 commits into from
Jan 30, 2024

Conversation

mtuchi
Copy link
Collaborator

@mtuchi mtuchi commented Jan 18, 2024

Summary

Add request(path, options, callback) function in salesforce

Details

Using state.connection.request() You can now send REST API request with given HTTP request info, with connected session information.

Issues

Ref #464

Review Checklist

Before merging, the reviewer should check the following items:

  • Does the PR do what it claims to do?
  • Are there any unit tests? Should there be?
  • Is there a changeset associated with this PR? Should there be? Note that
    dev only changes don't need a changeset.

@mtuchi mtuchi linked an issue Jan 18, 2024 that may be closed by this pull request
@mtuchi mtuchi changed the title wip: export request salesforce Add request() function Jan 19, 2024
@mtuchi mtuchi changed the title salesforce Add request() function salesforce add request() function Jan 19, 2024
@mtuchi mtuchi requested a review from josephjclark January 19, 2024 15:06
packages/salesforce/src/Adaptor.js Outdated Show resolved Hide resolved
packages/salesforce/src/Adaptor.js Outdated Show resolved Hide resolved
packages/salesforce/src/Adaptor.js Outdated Show resolved Hide resolved
packages/salesforce/src/Adaptor.js Show resolved Hide resolved
packages/salesforce/src/Adaptor.js Outdated Show resolved Hide resolved
@mtuchi mtuchi requested a review from josephjclark January 29, 2024 08:11
@mtuchi mtuchi marked this pull request as ready for review January 29, 2024 08:12
Copy link
Collaborator

@josephjclark josephjclark left a comment

Choose a reason for hiding this comment

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

Just a couple of little tweaks please!

packages/salesforce/src/Adaptor.js Outdated Show resolved Hide resolved
packages/salesforce/src/Adaptor.js Outdated Show resolved Hide resolved
packages/salesforce/src/Adaptor.js Outdated Show resolved Hide resolved
* @param {String} options.method - HTTP method to use. Defaults to GET
* @param {Object} [options.headers] - Object of request headers
* @param {Object} [options.json] - A JSON string request body
* @param {Object} [options.body] - Request body
Copy link
Collaborator

Choose a reason for hiding this comment

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

The body should probably have a string type here - although technically it's any body type supported by jsforce.request. So maybe no type is more appropriate

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Great, thanks

@mtuchi mtuchi requested a review from josephjclark January 30, 2024 13:06
@josephjclark josephjclark changed the base branch from main to release/salesforce January 30, 2024 17:42
@josephjclark josephjclark merged commit c28cb8d into release/salesforce Jan 30, 2024
1 check passed
@mtuchi mtuchi deleted the 464-salesforce-request-fn branch March 20, 2024 08:50
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.

Salesforce: add function(s) to make a request to a REST API
2 participants