1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2025-07-01 19:58:37 -04:00

Add comments to a few exported methods

This commit is contained in:
2020-10-06 23:08:02 -04:00
parent 631508ccc9
commit 8f3e7309f2
3 changed files with 16 additions and 0 deletions

View File

@ -61,6 +61,8 @@ func (c *BasicClient) CarriageReturnNewLines() bool {
return c.CarriageReturn
}
// RawRequest is a convenience wrapper around http.Post. It is exposed only for
// when you need to read/inspect the raw HTTP response yourself.
func (c *BasicClient) RawRequest(URL string, r io.Reader) (*http.Response, error) {
if !strings.HasPrefix(URL, "https://") {
return nil, errors.New("Refusing to send OFX request with possible plain-text password over non-https protocol")
@ -78,10 +80,14 @@ func (c *BasicClient) RawRequest(URL string, r io.Reader) (*http.Response, error
return response, nil
}
// RequestNoParse marshals a Request to XML, makes an HTTP request, and returns
// the raw HTTP response
func (c *BasicClient) RequestNoParse(r *Request) (*http.Response, error) {
return clientRequestNoParse(c, r)
}
// Request marshals a Request to XML, makes an HTTP request, and then
// unmarshals the response into a Response object.
func (c *BasicClient) Request(r *Request) (*Response, error) {
return clientRequest(c, r)
}