You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by lucast <lu...@hotmail.com> on 2017/07/28 08:59:30 UTC

HTTP PUT, POSTs to arbitrary URLs within wicket without use of any other 3rd party library

Dear forum, 
I need to send an HTTP PUT/POST request to an arbitrary URL and I have to
set headers and body.

Is there a way of doing this within wicket without using 3rd party libraries
such as spring framework's RestTemplate?

I looked at  wicketstuff-restannotations
<https://github.com/wicketstuff/core/tree/master/wicketstuff-restannotations-parent> 
, but it looks like it's more about publishing REST APIs rather than making
HTTP calls to external URLs. This is my limited understanding and it is
likely I may be wrong.

Thanks in advance,
Lucas

PS: this is my first post in 2 years. It's good to be back working with
wicket once more. =0)

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/HTTP-PUT-POSTs-to-arbitrary-URLs-within-wicket-without-use-of-any-other-3rd-party-library-tp4678338.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: HTTP PUT, POSTs to arbitrary URLs within wicket without use of any other 3rd party library

Posted by Andrea Del Bene <an...@gmail.com>.
You should be ok with standard class HttpURLConnection. To write request
body use getOutputStream.

On Fri, Jul 28, 2017 at 10:59 AM, lucast <lu...@hotmail.com> wrote:

> Dear forum,
> I need to send an HTTP PUT/POST request to an arbitrary URL and I have to
> set headers and body.
>
> Is there a way of doing this within wicket without using 3rd party
> libraries
> such as spring framework's RestTemplate?
>
> I looked at  wicketstuff-restannotations
> <https://github.com/wicketstuff/core/tree/master/
> wicketstuff-restannotations-parent>
> , but it looks like it's more about publishing REST APIs rather than making
> HTTP calls to external URLs. This is my limited understanding and it is
> likely I may be wrong.
>
> Thanks in advance,
> Lucas
>
> PS: this is my first post in 2 years. It's good to be back working with
> wicket once more. =0)
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/HTTP-PUT-POSTs-to-arbitrary-URLs-within-
> wicket-without-use-of-any-other-3rd-party-library-tp4678338.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>