mirror of
https://github.com/usebruno/bruno.git
synced 2025-01-11 00:18:46 +01:00
chore: polish request timeout
This commit is contained in:
parent
4c8ebe7765
commit
cdfa839cf3
@ -30,18 +30,16 @@ const Font = ({ close }) => {
|
||||
return (
|
||||
<StyledWrapper>
|
||||
<label className="block font-medium">Code Editor Font</label>
|
||||
<div className="input-container">
|
||||
<input
|
||||
type="text"
|
||||
className="block textbox mt-2 w-full"
|
||||
autoComplete="off"
|
||||
autoCorrect="off"
|
||||
autoCapitalize="off"
|
||||
spellCheck="false"
|
||||
onChange={handleInputChange}
|
||||
defaultValue={codeFont}
|
||||
/>
|
||||
</div>
|
||||
<input
|
||||
type="text"
|
||||
className="block textbox mt-2 w-full"
|
||||
autoComplete="off"
|
||||
autoCorrect="off"
|
||||
autoCapitalize="off"
|
||||
spellCheck="false"
|
||||
onChange={handleInputChange}
|
||||
defaultValue={codeFont}
|
||||
/>
|
||||
|
||||
<div className="mt-10">
|
||||
<button type="submit" className="submit btn btn-sm btn-secondary" onClick={handleSave}>
|
||||
|
@ -32,7 +32,7 @@ const General = ({ close }) => {
|
||||
return (
|
||||
<StyledWrapper>
|
||||
<div className="flex items-center mt-2">
|
||||
<label className="mr-2" style={{ minWidth: 200 }} htmlFor="ssl-cert-verification">
|
||||
<label className="mr-2 select-none" style={{ minWidth: 200 }} htmlFor="ssl-cert-verification">
|
||||
SSL Certificate Verification
|
||||
</label>
|
||||
<input
|
||||
@ -40,18 +40,20 @@ const General = ({ close }) => {
|
||||
type="checkbox"
|
||||
checked={sslVerification}
|
||||
onChange={() => setSslVerification(!sslVerification)}
|
||||
className="mousetrap h-4 w-4 mr-0"
|
||||
className="mousetrap mr-0"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex items-center mt-2">
|
||||
<label className="mr-2" style={{ minWidth: 200 }}>
|
||||
Request Timeout (in ms)
|
||||
</label>
|
||||
<div className="flex flex-col mt-6">
|
||||
<label className="block font-medium select-none">Request Timeout (in ms)</label>
|
||||
<input
|
||||
value={timeout === 0 ? '' : timeout}
|
||||
onChange={(e) => handleTimeoutChange(e.target.value)}
|
||||
type="text"
|
||||
className="block textbox w-1/6"
|
||||
className="block textbox mt-2 w-1/4"
|
||||
autoComplete="off"
|
||||
autoCorrect="off"
|
||||
autoCapitalize="off"
|
||||
spellCheck="false"
|
||||
onChange={(e) => handleTimeoutChange(e.target.value)}
|
||||
defaultValue={timeout === 0 ? '' : timeout}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
@ -155,6 +155,10 @@ const registerNetworkIpc = (mainWindow) => {
|
||||
}
|
||||
}
|
||||
|
||||
const preferences = getPreferences();
|
||||
const timeout = get(preferences, 'request.timeout', 0);
|
||||
request.timeout = timeout;
|
||||
|
||||
// run pre-request script
|
||||
const requestScript = compact([get(collectionRoot, 'request.script.req'), get(request, 'script.req')]).join(
|
||||
os.EOL
|
||||
@ -205,9 +209,6 @@ const registerNetworkIpc = (mainWindow) => {
|
||||
cancelTokenUid
|
||||
});
|
||||
|
||||
const preferences = getPreferences();
|
||||
const timeout = get(preferences, 'request.timeout', 0);
|
||||
request.timeout = timeout;
|
||||
const sslVerification = get(preferences, 'request.sslVerification', true);
|
||||
const httpsAgentRequestFields = {};
|
||||
if (!sslVerification) {
|
||||
@ -222,7 +223,7 @@ const registerNetworkIpc = (mainWindow) => {
|
||||
};
|
||||
|
||||
// client certificate config
|
||||
const clientCertConfig = get(brunoConfig, 'clientCertificates', []);
|
||||
const clientCertConfig = get(brunoConfig, 'clientCertificates.certs', []);
|
||||
|
||||
for (clientCert of clientCertConfig) {
|
||||
const domain = interpolateString(clientCert.domain, interpolationOptions);
|
||||
@ -657,6 +658,11 @@ const registerNetworkIpc = (mainWindow) => {
|
||||
}
|
||||
}
|
||||
|
||||
const preferences = getPreferences();
|
||||
const timeout = get(preferences, 'request.timeout', 0);
|
||||
request.timeout = timeout;
|
||||
const sslVerification = get(preferences, 'request.sslVerification', true);
|
||||
|
||||
// run pre-request script
|
||||
const requestScript = compact([get(collectionRoot, 'request.script.req'), get(request, 'script.req')]).join(
|
||||
os.EOL
|
||||
@ -698,11 +704,6 @@ const registerNetworkIpc = (mainWindow) => {
|
||||
...eventData
|
||||
});
|
||||
|
||||
const preferences = getPreferences();
|
||||
const timeout = get(preferences, 'request.timeout', 0);
|
||||
request.timeout = timeout;
|
||||
const sslVerification = get(preferences, 'request.sslVerification', true);
|
||||
|
||||
// proxy configuration
|
||||
const brunoConfig = getBrunoConfig(collectionUid);
|
||||
const proxyEnabled = get(brunoConfig, 'proxy.enabled', false);
|
||||
|
Loading…
Reference in New Issue
Block a user