astaxie / bat

Go implement CLI, cURL-like tool for humans
Apache License 2.0
2.55k stars 220 forks source link

Form value contains ":" be ignored #48

Open abo opened 8 years ago

abo commented 8 years ago
$ bat -v -f POST https://api.weibo.com/oauth2/access_token redirect_uri=http://127.0.0.1/project/oauth/callback

the redirect_uri did not sent to server

prologic commented 2 years ago

It's even worse, it doesn't work at all. Example:

$ bat -f POST http://10.0.0.109:8000/user/admin/webmention source=http://10.0.0.109:9000/twt/np4cvdq target=http://10.0.0.109:8000/user/admin/twtxt.txt
2022/01/23 10:28:24.183633 bat.go:215: can't get the url Post "http://10.0.0.109:8000/user/admin/webmention": net/http: invalid header field name "target=http"
prologic commented 2 years ago

69 fixes this though. If the author doesn't merge some fixes soon, I'll publish my own fork of this nice tool