Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



   974

Paste website with api

by JungleBoy0 - 24 January, 2023 - 06:54 PM
This post is by a banned member (JungleBoy0) - Unhide
This post is by a banned member (SANTA) - Unhide
This post is by a banned member (JungleBoy0) - Unhide
This post is by a banned member (S4L) - Unhide
S4L  
Heaven
8.164
Posts
2.344
Threads
2 Years of service
#4
(This post was last modified: 25 January, 2023 - 05:10 AM by S4L.)
I use http://paste.bingner.com/
do you need code sample ?

no api doc, but you can copy the request
there is no token in the POST
This post is by a banned member (JungleBoy0) - Unhide
This post is by a banned member (S4L) - Unhide
S4L  
Heaven
8.164
Posts
2.344
Threads
2 Years of service
#6
(This post was last modified: 25 January, 2023 - 05:52 PM by S4L.)
(25 January, 2023 - 01:54 PM)JungleBoy0 Wrote: Show More
(25 January, 2023 - 05:08 AM)S4L Wrote: Show More
I use http://paste.bingner.com/
do you need code sample ?

no api doc, but you can copy the request
there is no token in the POST

yes ,please
Code:
 
const createPaste = (data) => {
  return new Promise((resolve, reject) => {
    const options = {
      hostname: 'paste.bingner.com',
      port: 443,
      path: '/paste/new',
      method: 'POST',
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      },
    };
    const req = https.request(options, (res) => {
      resolve(`https://paste.bingner.com${res.headers['location']}`);
    });
    req.on('error', (e) => {
      console.log(`Error: ${e.message}`);
      reject(e);
    });
    req.write(`lang=text&text=${querystring.escape(data)}&expire=14d`);
    req.end();
  });
}

nodeJS, so you will need this too
 
Code:
 
const https = require('https');
const querystring = require('querystring');

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: