Skip to content

Commit

Permalink
added the charset to the content-type when invoking the API Gateway c…
Browse files Browse the repository at this point in the history
…onfig API from the API Manager
  • Loading branch information
EricWittmann committed Dec 23, 2014
1 parent 824533d commit 5e8eb5f
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -122,7 +122,7 @@ public void register(Application application) throws RegistrationException, NotA
try {
URI uri = new URI(this.endpoint + APPLICATIONS);
HttpPut put = new HttpPut(uri);
put.setHeader("Content-Type", "application/json"); //$NON-NLS-1$ //$NON-NLS-2$
put.setHeader("Content-Type", "application/json; charset=utf-8"); //$NON-NLS-1$ //$NON-NLS-2$
String jsonPayload = mapper.writer().writeValueAsString(application);
HttpEntity entity = new StringEntity(jsonPayload);
put.setEntity(entity);
Expand Down Expand Up @@ -164,7 +164,7 @@ public void publish(Service service) throws PublishingException, NotAuthorizedEx
try {
URI uri = new URI(this.endpoint + SERVICES);
HttpPut put = new HttpPut(uri);
put.setHeader("Content-Type", "application/json"); //$NON-NLS-1$ //$NON-NLS-2$
put.setHeader("Content-Type", "application/json; charset=utf-8"); //$NON-NLS-1$ //$NON-NLS-2$
String jsonPayload = mapper.writer().writeValueAsString(service);
HttpEntity entity = new StringEntity(jsonPayload);
put.setEntity(entity);
Expand Down

0 comments on commit 5e8eb5f

Please sign in to comment.