mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
* Add type definitions for request-as-curl * Fix TypeScript version in comment * Add correct project URL
15 lines
405 B
TypeScript
15 lines
405 B
TypeScript
import requestAsCurl = require("request-as-curl");
|
|
|
|
import { CoreOptions, Request, RequestAPI, RequiredUriUrl } from "request";
|
|
|
|
let stringValue: string;
|
|
const req: RequestAPI<Request, CoreOptions, RequiredUriUrl> = {} as any;
|
|
|
|
// with optional data
|
|
stringValue = requestAsCurl(req, {test: "data"});
|
|
|
|
// without optional data
|
|
stringValue = requestAsCurl(req);
|
|
|
|
stringValue = requestAsCurl.serialize(req);
|