Actually, this should do the trick:

java.net.URLEncoder.encode("Hello World", "UTF-8").replace("+", "%20");



On Tue, Feb 19, 2013 at 2:22 PM, Mike Tutkowski <
mike.tutkow...@solidfire.com> wrote:

> Hi,
>
> I've been able to make several successful API calls to CloudStack, but
> last night - for the first time - I wanted to use the space character (in a
> description field) for the first time.
>
> My call failed.  I believe it was because my URL encoder converts a space
> to a plus and it looks like we don't want that when coming up with the
> string that's used to generate our signature:
>
>
>
> For each field-value pair (as separated by a '&') in the Command String,
> URL encode each value so that it can be safely sent via HTTP GET.
>  Note
> Make sure all spaces are encoded as "%20" rather than "+".
> I'm just using the URLEncoder class in java.net.
>
> Does anyone know of a way for me to tell it to use %20 instead of a plus
> symbol?
>
> Thanks!
>
> --
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkow...@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the 
> cloud<http://solidfire.com/solution/overview/?video=play>
> *™*
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkow...@solidfire.com
o: 303.746.7302
Advancing the way the world uses the
cloud<http://solidfire.com/solution/overview/?video=play>
*™*

Reply via email to