Skip to content

Commit

Permalink
fix(util-format-url): remove headers or path from input (#1639)
Browse files Browse the repository at this point in the history
Neither `path` or `headers` is required for generating url string, so remove them from input parameter
  • Loading branch information
AllanZhengYP authored Oct 29, 2020
1 parent f329821 commit db7aa08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/util-format-url/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { buildQueryString } from "@aws-sdk/querystring-builder";
import { HttpRequest } from "@aws-sdk/types";

export function formatUrl(request: HttpRequest): string {
export function formatUrl(request: Omit<HttpRequest, "headers"|"method">): string {
const { port, query } = request;
let { protocol, path, hostname } = request;
if (protocol && protocol.substr(-1) !== ":") {
Expand Down

0 comments on commit db7aa08

Please sign in to comment.