mirror of
https://github.com/aclindsa/ofxgo.git
synced 2025-07-01 19:58:37 -04:00
Support carriage returns on new lines
This commit is contained in:
@ -19,6 +19,8 @@ type BasicClient struct {
|
||||
|
||||
// Don't insert newlines or indentation when marshalling to SGML/XML
|
||||
NoIndent bool
|
||||
// Use carriage returns on new lines
|
||||
CarriageReturn bool
|
||||
}
|
||||
|
||||
// OfxVersion returns the OFX specification version this BasicClient will marshal
|
||||
@ -54,6 +56,11 @@ func (c *BasicClient) IndentRequests() bool {
|
||||
return !c.NoIndent
|
||||
}
|
||||
|
||||
// CarriageReturnNewLines returns true if carriage returns should be used on new lines, false otherwise
|
||||
func (c *BasicClient) CarriageReturnNewLines() bool {
|
||||
return c.CarriageReturn
|
||||
}
|
||||
|
||||
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")
|
||||
|
Reference in New Issue
Block a user