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