Implemented the host name auto suggestion, and added Preset feature

This commit is contained in:
NI
2020-02-07 18:05:44 +08:00
parent 0a930d1345
commit 67c99e3092
22 changed files with 1582 additions and 332 deletions

View File

@@ -15,7 +15,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
export function head(url, headers) {
export function get(url, headers) {
return new Promise((res, rej) => {
let authReq = new XMLHttpRequest();
@@ -35,7 +35,7 @@ export function head(url, headers) {
rej(e);
};
authReq.open("HEAD", url, true);
authReq.open("GET", url, true);
for (let h in headers) {
authReq.setRequestHeader(h, headers[h]);