Skip to content

Instantly share code, notes, and snippets.

View miton18's full-sized avatar
🎯
Focusing

Collignon-Ducret Rémi miton18

🎯
Focusing
View GitHub Profile
@miton18
miton18 / ovh.js
Last active August 25, 2021 10:41
Postman OVH auth support
// environments to define
// endpoint -> https://api.ovh.com/1.0
// applicationKey
// applicationSecret
// consumerKey
// pre request script
pm.request.headers.add({
key: 'X-Ovh-Application',
value: pm.environment.get('applicationKey')
#!/usr/bin/env node
import WebSocket from 'websocket'
const tenant = 'user_xxx'
const namespace = 'pulsar_xxx'
const topic = 'sometopic'
const token = process.env.PULSAR_TOKEN
const producerURL = `wss://c2-pulsar-clevercloud-customers.services.clever-cloud.com:2000/ws/v2/producer/persistent/${tenant}/${namespace}/${topic}?token=${token}&producerName=toto`
const msg = {