Compare commits
2 Commits
19-06-25-7
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2000ca9b55 | ||
|
|
f49dc47f68 |
|
|
@ -60,6 +60,8 @@ export function preRequestHandlerWrapper(request) {
|
||||||
export function preRequestHandler() {
|
export function preRequestHandler() {
|
||||||
setHeader('x-dp-access-token', "gystG4wUtCCT0dkXxkMANL0PjQrCNAxxDWGkKYGQ9IkvrNo5pph78JGPWH4y-l1O_hQqxXHhdPU8dTRu25JScA");
|
setHeader('x-dp-access-token', "gystG4wUtCCT0dkXxkMANL0PjQrCNAxxDWGkKYGQ9IkvrNo5pph78JGPWH4y-l1O_hQqxXHhdPU8dTRu25JScA");
|
||||||
removeHeader('remove');
|
removeHeader('remove');
|
||||||
|
setMethod("POST");
|
||||||
|
const body = getJsonBody()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -105,7 +107,7 @@ export function getJsonBody() {
|
||||||
const contentType = currentRequest.contentType || currentRequest.headers?.['content-type'] || '';
|
const contentType = currentRequest.contentType || currentRequest.headers?.['content-type'] || '';
|
||||||
|
|
||||||
if (!contentType.includes('application/json')) {
|
if (!contentType.includes('application/json')) {
|
||||||
throw new InvalidJsonContentTypeError();
|
throw new InvalidJsonContentTypeError('Invalid json body',400);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user