mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-15 04:51:56 +00:00
Setting Content-Type and sending request for SnapshotPushRequest.
This commit is contained in:
parent
375916678d
commit
87bd7e6ff4
2 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ public class WriteLatexAPI implements WriteLatexDataSource {
|
|||
@Override
|
||||
public void putDirectoryContentsToProjectWithName(String projectName, RawDirectoryContents directoryContents, String remoteAddr) throws SnapshotPostException, IOException, FailedConnectionException {
|
||||
CandidateSnapshot candidate = dataModel.createCandidateSnapshotFromProjectWithContents(projectName, directoryContents, remoteAddr);
|
||||
new SnapshotPushRequest(candidate);
|
||||
new SnapshotPushRequest(candidate).request();
|
||||
throw new SnapshotPostException() {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -67,7 +67,7 @@ public abstract class Request<T extends Result> {
|
|||
}
|
||||
|
||||
private void performPostRequest() {
|
||||
request(new AsyncHttpClient().preparePost(url).setBody(getPostBody()));
|
||||
request(new AsyncHttpClient().preparePost(url).setBody(getPostBody()).setHeader("Content-Type", "application/json"));
|
||||
}
|
||||
|
||||
private void request(BoundRequestBuilder boundRequestBuilder) {
|
||||
|
|
Loading…
Reference in a new issue