1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

Update hoxt documentation to use List instead of Set for headers.

This commit is contained in:
Tibo-lg 2015-06-22 11:26:40 +02:00 committed by Florian Schmaus
parent e20c17050e
commit 3ff1ab6e1f

View file

@ -73,11 +73,11 @@ HttpOverXmppReq req = new HttpOverXmppReq(HttpMethod.POST, "/mailbox");
req.setVersion("1.1");
// prepare headers
Set<Header> set = new HashSet<Header>();
set.add(new Header("Host", "juliet.capulet.com"));
set.add(new Header("Content-Type", "application/x-www-form- urlencoded"));
set.add(new Header("Content-Length", Integer.toString(urlEncodedMessage.length())));
req.setHeaders(new HeadersExtension(set));
List<Header> list = new ArrayList<Header>();
list.add(new Header("Host", "juliet.capulet.com"));
list.add(new Header("Content-Type", "application/x-www-form- urlencoded"));
list.add(new Header("Content-Length", Integer.toString(urlEncodedMessage.length())));
req.setHeaders(new HeadersExtension(list));
// provide body or request (not mandatory, - empty body is used for GET)
AbstractHttpOverXmpp.Text child = new AbstractHttpOverXmpp.Text(urlEncodedMessage);