How to remove Accept Header from HttpRequestBuilder

def putXXX(): ChainBuilder =
      http("xxx xxx for xxx")
        .header(HeaderConstants.X_API_KEY, CLIENT_ID)
        .header(HeaderConstants.X_REQUEST_ID, LoadTestConfiguration.requestIdPrefix + "${randomString}")
        .header(HttpHeaderNames.Authorization, session =>
          "Bearer " + Auth.getClientData(session).token

The above code generates Http Request where Accept header is being sent as application/json.

Is there a way to remove this header explicitly? Actually in case of Accept header, server is returning 406.

You’re the one adding the Content-Type header with asJSON. If you don’t want the Content-Type header, just don’t add it :slight_smile: