question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create arbitrary POST request

See original GitHub issue

As the salesforce api continues to expand, it might be useful to create a way for nforce to make an arbitrary POST request while waiting for specific features to be supported.

Use Case: POST to generic streaming API channel.

This requires making an HTTP POST request to

/services/data/v36.0/sobjects/StreamingChannel/{channelId}/push

(where {channelId} is the salesforce ID for the generic channel).

I was able to get this to work, but I ended up using the should-be-private _apiRequest method. I would much rather have a way to make a POST pre-packaged in the same way that getUrl is made available for arbitrary HTTP GET requests.

I am crazy busy for the next month. If I can get back to this later, I might have a stab and make a PR. But if I post this here, maybe someone else will have a go first.

Thanks! Great lib, by the way!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
kevinohara80commented, Jan 23, 2018

I also added more low-level REST methods in v1.10.

2reactions
jkentjnrcommented, Nov 24, 2016

@afawcett I created https://github.com/jkentjnr/nforce-actions and have only added support to date for flows:

const org = nforce.createConnection({
  clientId: '<client_id>',
  clientSecret: '<client_secret>',
  redirectUri: '<redirect_uri>',
  username: process.env.SFUSER,
  password: process.env.SFPASS,
  plugins: ['customActions'] // loads the plugin in this connection
});

org.customActions.runFlow({ flow: { name: 'Test_Flow', params: { } }, oauth }, (err, response) => {
    console.log('RESP', err, response);
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make arbitrary POST requests using Zombie
How to make arbitrary POST requests using Zombie. GitHub Gist: instantly share code, notes, and snippets.
Read more >
FastAPI/Pydantic accept arbitrary post request body?
I want to create a FastAPI endpoint that just ...
Read more >
SSRF: send arbitrary POST requests into local networks - GitLab
The SSRF allows attackers to issue arbitrary POST requests into local network. The impact will be different, depending on which services are ...
Read more >
Handling arbitrary HTTP requests in Amazon API Gateway
In this post, I walk you through the steps to build a serverless web application that can accept arbitrary HTTP requests and use...
Read more >
Making requests | Ktor
After setting up the client, you can make HTTP requests. The main way of making HTTP requests is the request function that can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found