1

The silverpop "REST" API requires a pipe symbol: "|" in the URL. eg:

https://api6.ibmmarketingcloud.com/rest/databases/xxx/establishidentity/PUSH-xxx/xxxx|yyyy

When we use our code, it repaces the | with "%7C"

This is the code:

String url = baseURL + key + "/" + id + "|" + channel;
WebTarget webTarget = theHttpClient.target(url);
Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON)
                .header(HttpUtils.AUTHORISATION_HEADER_NAME, "Bearer " + theAccessToken);
response = invocationBuilder.method(method.getName(), Entity.json(theObjectMapper.writeValueAsString(payload)), response.class);

Is there a handy way to stop the conversion of | into %7C?

John Little
  • 10,707
  • 19
  • 86
  • 158
  • you can `.replace("%7C","|")` but I don't think that's what you want – Benjamin Urquhart May 01 '19 at 20:02
  • Pipe character is formally forbidden in URL and has to be encoded.It means silverpop REST API is somehow wrong(?). Please check https://stackoverflow.com/a/36667242/658801 – zolv May 01 '19 at 20:04

0 Answers0