mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Update hoxt documentation to use List instead of Set for headers.
This commit is contained in:
parent
e20c17050e
commit
3ff1ab6e1f
1 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue