mirror of
https://github.com/morten-olsen/http.md.git
synced 2026-02-08 00:46:28 +01:00
fix: fix parsing issue
This commit is contained in:
@@ -33,7 +33,8 @@ const httpHandler: ExecutionHandler = ({
|
||||
const content = template(context);
|
||||
const [head, body] = content.split('\n\n');
|
||||
const [top, ...headerItems] = head.split('\n');
|
||||
const [method, url] = top.split(' ');
|
||||
const [method, ...urlParts] = top.split(' ');
|
||||
const url = urlParts.join(' ').trim();
|
||||
|
||||
const headers = Object.fromEntries(
|
||||
headerItems.map((header) => {
|
||||
|
||||
Reference in New Issue
Block a user