MCPcopy Create free account
hub / github.com/cyclejs/cyclejs / normalizeRequestInput

Function normalizeRequestInput

http/src/http-driver.ts:122–131  ·  view source on GitHub ↗
(reqInput: RequestInput)

Source from the content-addressed store, hash-verified

120}
121
122function normalizeRequestInput(reqInput: RequestInput): RequestOptions {
123 if (typeof reqInput === 'string') {
124 return {url: reqInput};
125 } else if (typeof reqInput === 'object') {
126 return reqInput;
127 } else {
128 throw new Error(`Observable of requests given to HTTP Driver must emit ` +
129 `either URL strings or objects with parameters.`);
130 }
131}
132
133export type ResponseMemoryStream = MemoryStream<Response> & ResponseStream;
134

Callers 2

createResponse$Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected