Ok, I've found the solution...
In case anyone needs it, all the post parameters can be passed to the
HTTPRequest as a String using the following method:
request.setPayload("key=value".getBytes());
N
On Nov 19, 2:01 am, Nikola Okiljevic <[email protected]> wrote:
> Hi everyone,
>
> I have a rather trivial problem, but I can't seem to find the solution
> in the docs... I'm trying to fetch a HTML page via a POST request. I'm
> using the following code, and that works fine:
>
> URL url = new URL(sUrl);
> HTTPRequest request = new HTTPRequest(url, HTTPMethod.POST,
> Builder.allowTruncate());
> URLFetchService service = URLFetchServiceFactory.getURLFetchService();
> HTTPResponse response = service.fetch(request);
> byte[] content = response.getContent();
>
> The problem is - I don't know how to add any POST parameters (as if I
> was posting a form). Could anyone give me some pointers please?
>
> Thanks in advance,
>
> N
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.