adding in support for basic http auth

Needed basic http auth for use with a specific API, while using goreq. Added it to the request properties as well as added to the test suite to test basic auth.

[FYI: jefftexture and jefftulsa are the same person, just distinct github accounts]
I was thinking the flag might be needed to enforce basic auth regardless of
what username/password values happen to be (perhaps even if nil)..but this
is probably not a real use case. I have made your suggested changes as well
as ran 'go fmt' agains the code file prior to pushing.

Thanks.


On Fri, Aug 29, 2014 at 10:00 PM, Marcos Nils <notifications@github.com>
wrote:

> In goreq.go:
>
> > @@ -34,6 +34,9 @@ type Request struct {
> >  	MaxRedirects int
> >  	Proxy        string
> >  	Compression  *compression
> > +	UseBasicAuth bool
>
> Is this flag necessary?. We could just check for username and password not
> being null to set the BasicAuth options, What do you think?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/franela/goreq/pull/65/files#r16927526>.
>