1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-26 08:12:05 +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"); req.setVersion("1.1");
// prepare headers // prepare headers
Set<Header> set = new HashSet<Header>(); List<Header> list = new ArrayList<Header>();
set.add(new Header("Host", "juliet.capulet.com")); list.add(new Header("Host", "juliet.capulet.com"));
set.add(new Header("Content-Type", "application/x-www-form- urlencoded")); list.add(new Header("Content-Type", "application/x-www-form- urlencoded"));
set.add(new Header("Content-Length", Integer.toString(urlEncodedMessage.length()))); list.add(new Header("Content-Length", Integer.toString(urlEncodedMessage.length())));
req.setHeaders(new HeadersExtension(set)); req.setHeaders(new HeadersExtension(list));
// provide body or request (not mandatory, - empty body is used for GET) // provide body or request (not mandatory, - empty body is used for GET)
AbstractHttpOverXmpp.Text child = new AbstractHttpOverXmpp.Text(urlEncodedMessage); AbstractHttpOverXmpp.Text child = new AbstractHttpOverXmpp.Text(urlEncodedMessage);