Skip to content

Send REST using windows powershell #79

@cyrilbauvais

Description

@cyrilbauvais

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions