Skip to content

Commit

Permalink
fix incorrect url building
Browse files Browse the repository at this point in the history
  • Loading branch information
Capucinimo committed Jun 25, 2021
1 parent 13805d6 commit 1dc0719
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DiadocApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,14 +723,14 @@ DiadocApi::PrintFormResult DiadocApi::GeneratePrintForm(const std::wstring& boxI
TaskResult<DocumentProtocol> DiadocApi::GenerateDocumentProtocol(const std::wstring& boxId, const std::wstring& messageId, const std::wstring& documentId)
{
std::wstringstream buf;
buf << "?boxId=" << StringHelper::CanonicalizeUrl(boxId) << L"&messageId=" << StringHelper::CanonicalizeUrl(messageId) << L"&documentId=" << StringHelper::CanonicalizeUrl(documentId);
buf << "boxId=" << StringHelper::CanonicalizeUrl(boxId) << L"&messageId=" << StringHelper::CanonicalizeUrl(messageId) << L"&documentId=" << StringHelper::CanonicalizeUrl(documentId);
return PerformAsyncHttpRequest<DocumentProtocol>("GenerateDocumentProtocol", buf.str(), GET);
}

TaskResult<DocumentZipGenerationResult> DiadocApi::GenerateDocumentZip(const std::wstring& boxId, const std::wstring& messageId, const std::wstring& documentId, bool fullDocflow)
{
std::wstringstream buf;
buf << "?boxId=" << StringHelper::CanonicalizeUrl(boxId) << L"&messageId=" << StringHelper::CanonicalizeUrl(messageId) << L"&documentId=" << StringHelper::CanonicalizeUrl(documentId);
buf << "boxId=" << StringHelper::CanonicalizeUrl(boxId) << L"&messageId=" << StringHelper::CanonicalizeUrl(messageId) << L"&documentId=" << StringHelper::CanonicalizeUrl(documentId);
buf << L"&fullDocflow=" << (fullDocflow ? L"True" : L"False");
return PerformAsyncHttpRequest<DocumentZipGenerationResult>("GenerateDocumentZip", buf.str(), GET);
}
Expand Down Expand Up @@ -1762,7 +1762,7 @@ DiadocApi::Bytes_t DiadocApi::GetForwardedEntityContent(const std::wstring& boxI
TaskResult<DocumentProtocol> DiadocApi::GenerateForwardedDocumentProtocol(const std::wstring& boxId, const ForwardedDocumentId& forwardedDocumentId)
{
std::wstringstream buf;
buf << L"?boxId=" << StringHelper::CanonicalizeUrl(boxId);
buf << L"boxId=" << StringHelper::CanonicalizeUrl(boxId);
buf << L"&fromBoxId=" << StringHelper::Utf8ToUtf16(forwardedDocumentId.fromboxid());
buf << L"&messageId=" << StringHelper::Utf8ToUtf16(forwardedDocumentId.documentid().messageid());
buf << L"&documentId=" << StringHelper::Utf8ToUtf16(forwardedDocumentId.documentid().entityid());
Expand Down

0 comments on commit 1dc0719

Please sign in to comment.