fix: params, headers, url encoded syncing issues

This commit is contained in:
Andrew Bastin
2022-02-17 19:13:28 +05:30
parent 79914b32a1
commit 819b111383
7 changed files with 329 additions and 189 deletions

View File

@@ -60,7 +60,16 @@ const line = pipe(
const lineWithNoColon = pipe(
wsSurround(commented),
P.bindTo("commented"),
P.bind("key", () => stringTakeUntilCharsInclusive(["\n"])),
P.bind("key", () => P.either(
stringTakeUntilCharsInclusive(["\n"]),
() => pipe(
P.manyTill(P.sat((_: string) => true), P.eof()),
P.map(flow(
RA.toArray,
stringArrayJoin("")
))
)
)),
P.map(flow(
O.fromPredicate(({ key }) => !Str.isEmpty(key))
))