Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #39 from zanata/rhbz1124630-jersey
Browse files Browse the repository at this point in the history
rhbz1124630 - need to override accept header for some clients to work
  • Loading branch information
Patrick Huang committed Dec 15, 2014
2 parents 8fee4de + 6c2099d commit 93fb090
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Expand Up @@ -21,6 +21,8 @@

package org.zanata.rest.client;

import javax.ws.rs.core.MediaType;

import org.zanata.rest.dto.Project;
import org.zanata.rest.service.ProjectResource;
import com.sun.jersey.api.client.WebResource;
Expand Down Expand Up @@ -50,6 +52,7 @@ private WebResource webResource() {
}

public void put(Project project) {
webResource().put(project);
webResource().accept(MediaType.WILDCARD_TYPE).put(project);
}
}

Expand Up @@ -23,6 +23,8 @@

import java.net.URI;

import javax.ws.rs.core.MediaType;

import org.zanata.rest.dto.ProjectIteration;
import com.sun.jersey.api.client.WebResource;

Expand Down Expand Up @@ -55,10 +57,11 @@ private WebResource webResource() {
}

public void put(ProjectIteration projectVersion) {
webResource().put(projectVersion);
webResource().accept(MediaType.WILDCARD_TYPE).put(projectVersion);
}

public String sampleConfiguration() {
return webResource().path("config").get(String.class);
}
}

0 comments on commit 93fb090

Please sign in to comment.