arseniyandru
arseniyandru

Reputation: 798

CXF Url Encoding on a client side

How to disable url encoding on a client side using CXF For example

 restClient.sendRequest("[email protected]")

Will be converted to

Address: http://myhost.com/endpoint?email=myemail%40ololo.com
Http-Method: DELETE
Content-Type: application/xml
Headers: {Content-Type=[application/xml], Accept=[application/xml]}

How can I configure my client to disable that?

Upvotes: 1

Views: 1103

Answers (1)

pedrofb
pedrofb

Reputation: 39241

For any URL you can find, certain characters are special and must be escaped before forming the URI (See RFC 2396)

reserved    = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
                "$" | ","

It means you have to send the @ character as %40 in the URL.

If you want to send @ unescaped do not use a Query parameter. Use a POST request with the desired content in the body of the payload and a text content-type such as text/plain or application/xml (do not use application/x-www-form-urlencoded)

Upvotes: 2

Related Questions