I am trying to make a POST request but I can't get it done. Nothing is received on the other side.
Is this how it is supposed to work? I'm aware of the PostForm function but I think I can't use it because it can't be tested with httputil, right?
hc := http.Client{}
req, err := http.NewRequest("POST", APIURL, nil)
form := url.Values{}
form.Add("ln", c.ln)
form.Add("ip", c.ip)
form.Add("ua", c.ua)
req.PostForm = form
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
glog.Info("form was %v", form)
resp, err := hc.Do(req)
Your Answer
0 answers
Hot tools Tags
Hot Questions
Does Json.NET cache types' serialization information?
2026-01-05 17:22:14
What is the effect of encoding an image in base64?
2026-01-05 17:01:05
What this query does to create comma delimited list SQL Server?
2026-01-05 16:43:38
Avoid synchronized(this) in Java?
2026-01-05 16:22:14
Shutting down HTTP server after returning response
2026-01-05 16:01:12
Popular tool
vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation
VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library
PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment
VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library
SublimeText3 Chinese version
Chinese version, very easy to use
Hot Topics
Douyin level price list 1-75
20417
7
20417
7
wifi shows no ip assigned
13577
4
13577
4
Hot Article
How to set up price alerts so you don't miss key entry points?
2026-01-01
By DDD
Why do professional traders advise newbies to start with low leverage?
2026-01-01
By DDD
How to Fix a 'KERNEL_DATA_INPAGE_ERROR' on Windows?
2026-01-02
By 下次还敢
How to reverse a string in Python? (code examples)
2025-12-31
By 下次还敢






