pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: How to post file by pivot.
Date Wed, 09 Jun 2010 12:54:50 GMT
The easiest way to execute an HTTP POST in a Pivot application is by using the org.apache.pivot.web.PostQuery
class. Here are a couple examples:



The first one is a simple application that demonstrates unit testing a REST service using
web queries. The second one is a complete REST client application. It will be part of the
Pivot tutorial for Pivot 1.5.1. The tutorial documentation does not exist yet, but the code
should work OK.

Let me know if you have any questions about either example. Note that they both use JSONSerializer
to send and receive data - if you need to post arbitrary file content, you may want to consider
using an instance of org.apache.pivot.io.FileSerializer instead.


On Jun 8, 2010, at 11:22 PM, kenjiang@sz.murata.com.cn wrote:

> Hi All,
> Is there any example for post file and parameter to web server by pivot.
> I check the pivot API doc,but seems pivot 1.5 can't do that.
> Does we need use our custom API do it like (Apache httpclient)?
> Please advise.
> Best regards,
> Ken Jiang
> *******************************************
> Murata Electronics Trading  (Shenzhen) Co.,Ltd
> Tel:86-755-82847251
> E-mail:kenjiang@sz.murata.com.cn
> *******************************************

View raw message