httpie / desktop

🚀 HTTPie Desktop — cross-platform API testing client for humans. Painlessly test REST, GraphQL, and HTTP APIs.
https://httpie.io
Other
2.76k stars 31 forks source link

[Bug]: can't send json body with "{{}}" #54

Open east4ming opened 1 year ago

east4ming commented 1 year ago

What happened?

When I send json body like this:

        {
          "datasource": {
            "uid": "$datasource"
          },
          "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{cluster=\"$cluster\", namespace=\"$namespace\"}) by (pod)",
          "format": "time_series",
          "intervalFactor": 2,
          "legendFormat": "{{pod}}",
          "refId": "A",
          "step": 10
        }

error: image image

Steps to reproduce?

1. send above json body

What did you expect to happen?

  1. send above json body {{pod}} (not env)

Platform

Windows

HTTPie Desktop version

2022.5.1

Relevant log output

No response

Code of Conduct

jkbrzt commented 1 year ago

Thanks for the report. We need a way to escape those literals. Coming soon.

ashutosh887 commented 1 year ago

@jakubroztocil I would like to work on this Project. Could you please guide me how to get started with desktop code?

kyelewis commented 4 months ago

This makes it difficult to use httpie desktop for my current use case.

I wonder if the current behaviour for undefined variables (prevent sending of the request) is really the desired one, instead if a variable isn't defined at all, should it just not be evaluated at all?