Skip to content

Commit

Permalink
Merge pull request #26 from trocco-io/fixed-content-type-matcher
Browse files Browse the repository at this point in the history
use startsWith to determine the response is a text/csv or not
  • Loading branch information
NamedPython authored Jun 12, 2024
2 parents 6763381 + 7c9736a commit e6a968a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public Response getResponse() throws Exception
@Override
public InputStream readResponseContent() throws Exception
{
if (!getResponse().getHeaders().getField(HttpHeader.CONTENT_TYPE).getValue().equals("text/csv")) {
if (!getResponse().getHeaders().getField(HttpHeader.CONTENT_TYPE).getValue().startsWith("text/csv")) {
String errorString = readResponseContentInString();

MarketoResponse<ObjectNode> errorResponse = OBJECT_READER.readValue(errorString);
Expand Down

0 comments on commit e6a968a

Please sign in to comment.