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

Expose methods other than GET via restful API #96

Closed
demianbrecht opened this issue Feb 12, 2016 · 3 comments · Fixed by #97
Closed

Expose methods other than GET via restful API #96

demianbrecht opened this issue Feb 12, 2016 · 3 comments · Fixed by #97

Comments

@demianbrecht
Copy link
Collaborator

Currently, Salesforce.restful only allows for get API calls. There should be a mechanism that allows a user to use other HTTP methods as well.

Reported by @babakh.

@hello-josh
Copy link
Contributor

The bigger problem is that some methods use requests on their own instead of using _call_salesforce like the rest of the codebase. #54 also has the same issue.

@demianbrecht
Copy link
Collaborator Author

@TRII: I might be missing something, but #54 uses self.request which is an instance of requests.Session, not requests directly (unless that's what you're referring to). Is there elsewhere that I'm missing where requests is used directly? The response handling should be generalized between #54 and Salesforce.restful though.

There is another issue in that SFType and Salesforce don't share sessions, but that's captured in #91.

@hello-josh
Copy link
Contributor

I was referring more to mixed use of the requests.Session instance vs the internal _call_salesforce wrapper. For consistency's sake, everything should use _call_salesforce, and _call_salesforce should use the requests.Session. If not, there is no reason for _call_salesforce to exist.

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 a pull request may close this issue.

2 participants