I've tried both of these:
builder.scheme("http").authority("10.0.2.2:28642").appendPath("api").appendPath("DeliveryItems").appendPath("PostArgsAndXMLFileAsStr").
builder.scheme("http").authority("10.0.2.2:28642/api").appendPath("DeliveryItems").appendPath("PostArgsAndXMLFileAsStr").
...and although for other reasons the code is not working yet, I'm wondering which way is right:
.authority("10.0.2.2:28642").appendPath("api").
-or:
authority("10.0.2.2:28642/api").
?
The "authority" portion of a URI identifies who's responsible for specifying the semantics of the path portion. This is usually a host/port combination and can optionally include a username/password (as in http://user:pass@host:port/somepage
).