40 lines
No EOL
830 B
Markdown
40 lines
No EOL
830 B
Markdown
sentry2 (stellar)
|
|
|
|
```js
|
|
const fetch=require('node-fetch')
|
|
|
|
// const baseurl='https://rentry.co'
|
|
const baseurl='https://sentrytwo.com'
|
|
|
|
const fetchurl=`${baseurl}/api/new`
|
|
|
|
const jsbody={
|
|
content : 'this is text',
|
|
custom_url : '',
|
|
edit_password: 'secret',
|
|
|
|
}
|
|
|
|
const requestBody = new URLSearchParams(jsbody);
|
|
|
|
const csrfToken='R1ukF9nRyNITFeftszagNiM5g2izx0UtfNkPOIwurFqtVP63L00pQh1ahD6dmfj5' // for rentry, epire in 2025
|
|
|
|
fetch(fetchurl,{
|
|
method : 'POST',
|
|
headers: {
|
|
// 'Content-Type': 'application/x-www-form-urlencoded',
|
|
'Content-Type': 'application/json',
|
|
// "Referer": 'https://rentry.co',
|
|
// 'X-CSRF-Token': csrfToken,
|
|
},
|
|
body : JSON.stringify(jsbody)
|
|
})
|
|
.then(res=>res.text())
|
|
.then(data=>{
|
|
console.log('data: ',data)
|
|
})
|
|
.catch(err=>{
|
|
console.log('err: ',err)
|
|
})
|
|
|
|
``` |