Skip to content

Commit

Permalink
use startsWith to determine if the response is a text/csv
Browse files Browse the repository at this point in the history
  • Loading branch information
d-hrs committed Jun 12, 2024
1 parent 6763381 commit 7c9736a
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 7c9736a

Please sign in to comment.