allegro / allegro/tipboard

Send REST using windows powershell

Aperta
#79 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
1.1k
Fork
155
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi All

I am searching to solve this problem for a long time, without success.
I am using tipboard for few weeks now, it is perfet, easy and efficient !

I know well how to send data using REST from linux, no problem. But I need to send data from a windows 10 pc now. I do not know powershell at all...

I try for example this, but get this result :

`$params = @{
Uri = 'http://192.168.28.84:7272/api/v0.1/xxx/push'
Body = @{
tile = 'pie_chart';
key = 'tuile2';
data = @{
title = 'BIDULE';
pie_data = @{ Pie1 = 100; Pie2 = 200}
} | ConvertTo-Json
}
Method = 'POST'
}
Invoke-RestMethod @params`

But tipboard log shows this

`[D 210225 09:56:19 redis_utils:57] db key: u'snsght:tile:tuile2' set to value: '{"tile_template": "pie_chart", "meta": {}, "data": {"pie_data": {"Pie2": 200, "Pie1": 100}, "title": "BIDULE"}, "modified": "2021-02-25T09:56:19-00:00", "id": "tuile2"}'`

I think it should receive something like this

`{"pie_data": [["Pie2": 200, "Pie1": 100]], "title": "BIDULE"}`

someone here knows windows powershell ?

thanks, best regards

Cyril

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.