Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: failing create teams request #636

Merged
merged 5 commits into from
Jul 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/app/views/common/share.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const createShareLink = (sampleQuery: IQuery, authenticated?: boolean): s

if (sampleBody && Object.keys(sampleBody).length > 0) {
const requestBody = hashEncode(JSON.stringify(sampleBody));
shareLink = `&requestBody=${requestBody}`;
shareLink = `${shareLink}&requestBody=${requestBody}`;
}

if (sampleHeaders && sampleHeaders.length > 0) {
Expand All @@ -45,5 +45,5 @@ export const createShareLink = (sampleQuery: IQuery, authenticated?: boolean): s
};

const hashEncode = (requestBody: string): string => {
return btoa(requestBody);
};
return btoa(unescape(encodeURIComponent(requestBody)));
};
2 changes: 1 addition & 1 deletion src/app/views/query-runner/QueryInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class QueryInput extends Component<IQueryInputProps, any> {
background: getStyleFor(selectedVerb),
};

const httpMethodsToDisplay = (mode === Mode.TryIt && !authenticated ) ? [httpMethods[0]] : httpMethods;
const httpMethodsToDisplay = (!authenticated) ? [httpMethods[0]] : httpMethods;

return (
<div className='row'>
Expand Down