Skip to content

Commit

Permalink
fix(): fail to parse responses request depending on Postman's version
Browse files Browse the repository at this point in the history
Depending on the version of Postman used, responses request are
downloaded as JSON objects or a string refering to a request object.
This caused postmanerator to fail when parsing the collection file.

Now responses request are deserialized into an emty interface, which
prevents that behavior.

Reference #16
  • Loading branch information
aubm committed Apr 25, 2016
1 parent 5701cc5 commit e613602
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions postman/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,7 @@ type Response struct {
RunTests bool `json:"runTests"`
ID string `json:"id"`
Name string `json:"name"`
Request struct {
URL string `json:"url"`
Headers []struct {
Key string `json:"key"`
Value string `json:"value"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
} `json:"headers"`
Data string `json:"data"`
Method string `json:"method"`
DataMode string `json:"dataMode"`
} `json:"request"`
Request interface{} `json:"request"`
}

type ResponseHeader struct {
Expand Down

0 comments on commit e613602

Please sign in to comment.