add init world data

This commit is contained in:
lbenedar
2026-04-08 18:19:20 +03:00
parent e5deb5d76d
commit 468e027418
9 changed files with 464 additions and 74 deletions

View File

@@ -2,6 +2,7 @@ package requests
import (
"errors"
"fmt"
"net/http"
"strings"
@@ -71,3 +72,16 @@ func (conf *Config) SetSessionTokenFromHeader(resp http.Header) (bool, error) {
return false, nil
}
func (conf *Config) GetRequestHeader() *http.Header {
header := http.Header{}
header.Set("Cookie", fmt.Sprintf("session=%s", conf.SessionID))
header.Set("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
header.Set("Connection", "keep-alive")
header.Set("Content-Type", "application/x-www-form-urlencoded")
header.Set("Host", conf.Host)
header.Set("Origin", fmt.Sprintf("http://%s", conf.Host))
header.Set("Referer", fmt.Sprintf("http://%s%s", conf.Host, AuthPath))
return &header
}