Skip to content
Advertisement

Change NameValuePair separator from ‘=’ to ‘:’

I am trying to send a HttpPost request, and to do this, from what I understand, you do this:

JavaScript

The problem I’m having is that the entity looks like this:

JavaScript

But due to the way the server is set up, I need it to look like this:

JavaScript

You will notice that rather than equal (=) signs, there are colons (:) separating the key/value pairs.

My is question is: How do I fix this?

Advertisement

Answer

You might consider using JSONObject instead of UrlEncodedFormEntity — since it looks like you want a JSON string, not a URL encoded string.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement