Skip to content

Commit

Permalink
📝 Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
elbywan committed Oct 3, 2017
1 parent 457852d commit 6b074dc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dist/bundle/wretch.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/wretcher.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ export declare class Wretcher {
query(qp: object): Wretcher;
/**
* Set request headers.
* @param headerValues An object containing header key and values
* @param headerValues An object containing header keys and values
*/
headers(headerValues: {
[headerName: string]: any;
}): Wretcher;
/**
* Shortcut to set the "Accept" header.
* @param what Header value
* @param headerValue Header value
*/
accept(headerValue: string): Wretcher;
/**
* Shortcut to set the "Content-Type" header.
* @param what Header value
* @param headerValue Header value
*/
content(headerValue: string): Wretcher;
/**
Expand Down Expand Up @@ -336,12 +336,12 @@ export declare class Wretcher {
body(contents: any): Wretcher;
/**
* Sets the content type header, stringifies an object and sets the request body.
* @param jsObject An object
* @param jsObject An object which will be serialized into a JSON
*/
json(jsObject: object): Wretcher;
/**
* Converts the javascript object to a FormData and sets the request body.
* @param formObject An object
* @param formObject An object which will be converted to a FormData
*/
formData(formObject: object): Wretcher;
}
10 changes: 5 additions & 5 deletions dist/wretcher.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/wretcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,23 @@ export class Wretcher {

/**
* Set request headers.
* @param headerValues An object containing header key and values
* @param headerValues An object containing header keys and values
*/
headers(headerValues: { [headerName: string]: any }) {
return new Wretcher(this._url, mix(this._options, { headers: headerValues }))
}

/**
* Shortcut to set the "Accept" header.
* @param what Header value
* @param headerValue Header value
*/
accept(headerValue: string) {
return this.headers({ Accept : headerValue })
}

/**
* Shortcut to set the "Content-Type" header.
* @param what Header value
* @param headerValue Header value
*/
content(headerValue: string) {
return this.headers({ "Content-Type" : headerValue })
Expand Down Expand Up @@ -146,14 +146,14 @@ export class Wretcher {
}
/**
* Sets the content type header, stringifies an object and sets the request body.
* @param jsObject An object
* @param jsObject An object which will be serialized into a JSON
*/
json(jsObject: object) {
return this.content("application/json").body(JSON.stringify(jsObject))
}
/**
* Converts the javascript object to a FormData and sets the request body.
* @param formObject An object
* @param formObject An object which will be converted to a FormData
*/
formData(formObject: object) {
const formData = new FormData()
Expand Down

0 comments on commit 6b074dc

Please sign in to comment.