I have the following code in an AsyncTask 

```
 try {
        URL url = new URL(Constants.REST_URL + "signIn");

        String jsonString = "{regId:" + regId + "}";
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setRequestMethod("POST");
        conn.setRequestProperty("User-Agent", "");
        conn.setRequestProperty("Host", Constants.HOST);
        conn.setRequestProperty("Connection", "Keep-Alive");
        conn.setRequestProperty("Accept", "application/json, text/plain, */*");
        conn.setRequestProperty("Accept-Encoding", "gzip, deflate");
        conn.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
        conn.setRequestProperty("Content-Length", String.valueOf(jsonString.length()));
        conn.setRequestProperty("Authorization", "Basic " + Base64.encodeToString((userName + ":" + encryptedPassword).getBytes(), Base64.DEFAULT));
        conn.setDoOutput(true);
        conn.setDoInput(true);
        conn.getOutputStream().write(jsonString.getBytes("UTF-8"));
        conn.connect();
        int responseCode = conn.getResponseCode();
        BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
        StringBuilder stringBuilder = new StringBuilder();
        String inputLine;
        while ((inputLine = in.readLine()) != null)
            stringBuilder.append(inputLine);
        in.close();
        conn.disconnect();
        String responseString = stringBuilder.toString();
        /****** Creates a new JSONObject with name/value mappings from the JSON string. ********/
        JSONObject jsonResponse = new JSONObject(responseString.toString());
        user = new User();
        /***** Returns the value mapped by name if it exists and is a JSONArray. ***/
        user.setUserId(new BigInteger(jsonResponse.optString("userId")));
        user.setUserName(jsonResponse.optString("userName"));
        user.setUserEmail(jsonResponse.optString("userEmail"));
        user.setUserLevel(Integer.valueOf(jsonResponse.optString("userLevel")));

        return user;

    } catch (MalformedURLException e) {
        error = true;
        e.printStackTrace();
    } catch (UnsupportedEncodingException e) {
        error = true;
        e.printStackTrace();
    } catch (IOException e) {
        error = true;
        e.printStackTrace();
    } catch (JSONException e) {
        error = true;
        e.printStackTrace();
    }
    return null;

```

and the following in my Nodejs server

```
 router.post('/',  function(req, res) {
        console.log("body: ", req.body);
        console.log("headers: ", req.headers);
        console.log(req.user);
        res.status(200).send(req.user).end();
 });     

```

When i make the http post from a browser everything is fine. But when i'm trying to make the http post from my android app i get the following output.

```
{ [SyntaxError: Unexpected token r]
  body:          '\r\n{regId:APA91bGRb3Ad70sqWSUlNl4Jp2_EFLv8wXKW5dwUay3rSfsLPPbqD_XQQofWtw2q27e8bjz5ZEYAC5zL-uaD3UofiplnrJBNp8IL888XveAByZdOA63A9zoktgOTurcaBkow40bnZKMN6lZZzvuVGAZ0L3UOraSVYRJ1qSb6kQhFL7BglCSmM8',
  status: 400 }

```

What am i doing wrong?
Thanks in advance.