Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send REST using windows powershell #79

Open
cyrilbauvais opened this issue Feb 25, 2021 · 0 comments
Open

Send REST using windows powershell #79

cyrilbauvais opened this issue Feb 25, 2021 · 0 comments

Comments

@cyrilbauvais
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant