Set body on SPARQL request

This commit is contained in:
Stefan Ollinger 2023-10-17 11:23:11 +02:00
parent b28f7625e4
commit 4ab4f09987

View File

@ -88,6 +88,13 @@ const prepareRequest = (request, collectionRoot) => {
axiosRequest.data = request.body.xml;
}
if (request.body.mode === 'sparql') {
if (!contentTypeDefined) {
axiosRequest.headers['content-type'] = 'application/sparql-query';
}
axiosRequest.data = request.body.sparql;
}
if (request.body.mode === 'formUrlEncoded') {
axiosRequest.headers['content-type'] = 'application/x-www-form-urlencoded';
const params = {};