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

Parsing basic datatypes for simplified JSON request #82

Open
SundayPowerEndre opened this issue Jul 6, 2024 · 1 comment
Open

Parsing basic datatypes for simplified JSON request #82

SundayPowerEndre opened this issue Jul 6, 2024 · 1 comment

Comments

@SundayPowerEndre
Copy link

SundayPowerEndre commented Jul 6, 2024

With the basic syntax of curlie -v POST {addr}/greeting name=Nick is_cool=true i think it would make sense that it is possible to use basic types data types i.e. string, number, boolean, null

As far as i can tell it parses everything as a string at present.

I am assuming that with a simplified interface it would be more challenging to use and implement arrays and nested objects, so i think that for those it would be easier to just use the -d flag.

@potoo0
Copy link

potoo0 commented Aug 31, 2024

use := instead of =, eg:

curlie POST http://httpbin.org/post header1:v1 a1=1 a2:=1 b1=false b2:=false c1=null c2:=null

got response

...
    "headers": {
        "Header1": "v1",
...
    },
    "json": {
        "a1": "1",
        "a2": 1,
        "b1": "false",
        "b2": false,
        "c1": "null",
        "c2": null
    },
...

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

2 participants