Commit fee714cb authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Parse received strings as such in transport

parent 8c057616
......@@ -110,9 +110,13 @@ func (transport *HTTPTransport) request(url string, method string, result interf
if verbose {
fmt.Printf("RESPONSE: %s\n", string(body))
}
err = json.Unmarshal(body, result)
if err != nil {
return &Error{Err: err, Status: res.StatusCode}
if _, resultstr := result.(*string); resultstr {
*result.(*string) = string(body)
} else {
err = json.Unmarshal(body, result)
if err != nil {
return &Error{Err: err, Status: res.StatusCode}
}
}
return nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment