*/
private static Scriptable post(Context cx, Object[] arguments, APPClientHostObject hostObject,
Entry entry) throws CarbonException {
performAuthentication(hostObject, (String) arguments[0]);
Response response = hostObject.client.post((String) arguments[0],
new BaseRequestEntity(entry, false),
hostObject.options);
// Check the response.
if (response.getStatus() != 201) {
throw new CarbonException("Posting Failed." + response.getStatusText());
}
Scriptable entryHostObject = cx.newObject(hostObject, "AtomEntry", new Object[0]);
((AtomEntryHostObject) entryHostObject).setEntry(entry);