var channel = piesocket.subscribe(channelId);
channel.on('message', function(msg){
console.log(msg);
});
val listener = PieSocketListener();
val ws: WebSocket = client.newWebSocket(
request, listener
);
var request = URLRequest(url: URL(string: "wss://demo.websocket.me/v3/"+channelId+"?api_key="+apiKey)!)
socket = WebSocket(request: request)
socket.connect()
unirest('POST', 'https://www.piesocket.com/api/publish')
.send(JSON.stringify({
"message": { "text": "Hello world!" }
}))
requests.request(
"POST", url, headers=headers, data = json.dumps({
"message": { "text": "Hello world!" }
}))
curl_setopt_array($curl, [CURLOPT_POSTFIELDS => ['message' =>
["text" => "Hello world!"]]]
);
curl_exec($curl);
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = { message: { "text": "Hello world!" } }.to_json
response = https.request(request)
Request request = new Request.Builder()
.url("https://www.piesocket.com/api/publish")
.build();
Response response = client.newCall(request).execute();
payload := strings.NewReader("{\"message\": \"Hello world!\"\n}")
res, err := client.Do(req)
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
# Demo API key and secret used, get yours at https://piesocket.com
curl --location --request POST 'https://www.piesocket.com/api/publish' \
--header 'Content-Type: application/json' \
--data-raw '{
"key": "oCdCMcMPQpbvNjUIzqtvF1d2X2okWpDQj4AwARJuAgtjhzKxVEjQU6IdCjwm",
"secret": "d8129f82f8dd71910aa4a7efa30a7297",
"channelId": 1,
"message": "Hello world!"
}'
# Demo API key and secret used, get yours at https://piesocket.com
wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--body-data '{
"key": "oCdCMcMPQpbvNjUIzqtvF1d2X2okWpDQj4AwARJuAgtjhzKxVEjQU6IdCjwm",
"secret": "d8129f82f8dd71910aa4a7efa30a7297",
"channelId": 1,
"message": "Hello world!"
}' \
'https://www.piesocket.com/api/publish'
Accessdoorsandpanels.com
Highly recommended services, our developer suggested it and it has been a lifesaver since then.
PurpleRain Technologies Inc.
Shifting to PieSocket for Limecall was one of the best decisions we took!
Uniqbrow SL
What a great team! Signed up for how easy it is to integrate, stayed for reliability and support.
The Design Yard
PieSocket powers all of the projects that require websocket capabilities at our company.
FireBooth
Thank you PieSocket team for taking away my worries about the WebSocket infrastructure.