Skip to content

[Questions] How to get the info with curl for ws api #120

Answered by sm-shaw
ayiyaliing asked this question in Q&A
Discussion options

You must be logged in to vote

With curl use a format such as follows, note the spaces at the start and end.

curl -v http://127.0.0.1:8080/dbset --data ' "db":"pg" '
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> POST /dbset HTTP/1.1
> Host: 127.0.0.1:8080
> User-Agent: curl/7.58.0
> Accept: */*
> Content-Length: 11
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 11 out of 11 bytes
< HTTP/1.1 200 Ok
< Server: wapp
< Connection: close
< Content-Security-Policy: default-src 'self'
< Content-Type: application/json
< Content-Length: 54
<
* Closing connection 0
{"success": {"message": "Database set to PostgreSQL"}}


curl -v http://127.0.0.1:…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by abondvt89
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #120 on December 16, 2020 18:07.