The more complex way to construct the request is presented in the sample code. With the NewRequest method of the net/http package, the pointer to the Request struct is returned. The function consumes the method's request, URL, and body of the request. Notice the way the form is built. Instead of using the plain string, the url.Values struct is used. Finally, the Encode method is called to encode the given form values. The headers are set via the http.Header property of the request.