title: POST user and password to http using Retrofit2
body: <p>Need a little bit of help on using Retrofit2 for POST. 
  The link post should be like: <a href="http://10.100.1.80:40000/login/john/mypass" rel="nofollow noreferrer">http://10.100.1.80:40000/login/john/mypass</a> as simple as it looks I can't seem to figure this out. (for now I'm getting SocketTimeoutException: failed to connect to /10.100.1.80 (port 40000) after 10000ms , in Postman works)  </p>
  
  <p>Interface is like:</p>
  
  <pre><code>@FormUrlEncoded
  @POST("login")
   Call&lt;ResponseBody&gt; insertUser(
          @Field("user") String user,
          @Field("password") String password);
  </code></pre>
  
  <p>Main code:</p>
  
  <pre><code>        Retrofit retrofit = new Retrofit.Builder()
              .baseUrl("http://10.100.1.80:40000/")
              .build();
  
  
      APIServicePOST service = retrofit.create(APIServicePOST.class);
  
      // executes the request
      retrofit2.Call&lt;ResponseBody&gt; call = service.insertUser("john",  "mypass" );
      call.enqueue(new Callback&lt;ResponseBody&gt;() {
  
  
          @Override
          public void onResponse(Call&lt;ResponseBody&gt; call, Response&lt;ResponseBody&gt; response) {
              mResponseTv.setText( "OK" +  response.toString() );
          }
  
          @Override
          public void onFailure(Call&lt;ResponseBody&gt; call, Throwable t) {
              mResponseTv.setText( t.toString() );
          }
      });
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p><strong>UPDATE:</strong>
  After I fried my brain over a simple POST that didn't worked found out today that I must be on another WI-FI connection on which the IP works.</p>