|
Johnalan Simmons |
at Apr 22, 2013 at 1:07 am
|
⇧ |
| |
If I were to just pass the json string into string NewReader, would that be
sufficient, or would that approach only work for say urlenoded data?
post_data := strings.NewReader(jsonString)
req := http.NewRequest("POST", "www.example.com", post_data)
// ... add header stuff
would this be sufficient
On Sunday, April 21, 2013 7:56:58 PM UTC-4, [email protected] wrote:I can't seem to find how to make a post request with post data, and custom
set headers.
The data is in json form such as:
{
channel : { 1 , 2 }
data : { 'hello world' }
}
I can make post requests, and make requests with custom headers, but can't
seem to do both.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[email protected].
For more options, visit
https://groups.google.com/groups/opt_out.