DefinitelyTyped/fine-uploader/test/request.ts
Bradford Wagner f2d8c8ac18 Feature/fine uploader (#13768)
* Adding FineUploader typings

* noImplicitThis true

* adding tslint.json

* tslint.json -> tslint

* fixing some lintings

* fixing lintings

* removing version

* added typescript version

* defaults that are null/undefined now are | null/undefined respectively

* removed minor version from fineuploader definition, removed typescript 2 version
2017-01-05 12:37:43 -08:00

34 lines
841 B
TypeScript

/// <reference path="../index.d.ts" />
function requestTest() {
type CustomHeader = {
customHeader: string;
};
type CustomParam = {
customParam: boolean;
};
const requestOptions: qq.RequestOptions<CustomHeader, CustomParam> = {
customHeaders: {
customHeader: "my custom header hehehehee"
},
endpoint: "/my/custom/endpoint",
filenameParam: "newFilenameParam",
forceMultipart: true,
inputName: "filenameParamMapping",
method: "POST",
params: {
customParam: false
},
paramsInBody: false,
uuid: "asdf123456",
totalFileSizeName: "totalFileSize"
};
const config: qq.BasicOptions = {
request: requestOptions
};
const uploader = new qq.FineUploaderBasic(config);
}