mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-29 12:01:32 +02:00
Setting Content-Type and sending request for SnapshotPushRequest.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user