title: Spring Android POST no return type application/octet-stream in ResponseEntity
body: <p>I am working with a Node.js server running Express 3.0. </p>
  
  <p>During one part in my application I POST json to a URI to purchase a powerup at /api/transactions/powerup. This has several return options. </p>
  
  <p>I will either receive a 201 meaning that the transaction was valid, a 404 that the request was not valid due to insufficient funds. My problem is that if I want to tell the android client whether it was successful based only on the headers that are in the ResponseEntity. </p>
  
  <p><strong>There is no json</strong> that is passed back to the client because the HTTP codes can tell me if it was successful. Does anyone know how to do this?</p>
  
  <pre><code>PowerupPurchase purchase = new PowerupPurchase();
  purchase.setPowerId(params[0]);
  final String url = getString(R.string.external_api_url) + "/transactions/powers?apiKey="+mCurrentUser.getApiKey();
  
  Log.i(TAG,url);
  // create the headers
  HttpHeaders requestHeaders = new HttpHeaders();
  requestHeaders.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));
  requestHeaders.setAcceptEncoding(ContentCodingType.GZIP);
  requestHeaders.setContentType(MediaType.APPLICATION_JSON);
  
  // Create the Json that will be exchanged
  HttpEntity&lt;?&gt; requestEntity = new HttpEntity&lt;PowerupPurchase&gt;(purchase, requestHeaders);
  // Create a new RestTemplate instance
  RestTemplate restTemplate = new RestTemplate();
  
  MappingJacksonHttpMessageConverter converter = new MappingJacksonHttpMessageConverter();
  List&lt;MediaType&gt; mediaList = new LinkedList&lt;MediaType&gt;();
  mediaList.add(new MediaType("application","octet-stream",Charset.forName("UTF-8")));
  converter.setSupportedMediaTypes(mediaList);
  restTemplate.getMessageConverters().add(converter);
  
     try {
          // Make the network request
      ResponseEntity&lt;?&gt; response = restTemplate.postForEntity(url, requestEntity, Object.class);
      // HOW DO I GET THE HEADERS??
          response.getHeaders()
  </code></pre>
  
  <p>400's seem to always throw errors in Spring Android is there anyway that I can simply look at the http header and not worry about a return object map to?</p>