mirror of
				https://github.com/statping/statping.git
				synced 2021-10-16 23:41:31 +03:00 
			
		
		
		
	Merge pull request #895 from britannic/Improve-Web-Browser-Emulation
Improve web browser emulation
This commit is contained in:
		| @@ -5,7 +5,6 @@ import ( | ||||
| 	"crypto/tls" | ||||
| 	"errors" | ||||
| 	"fmt" | ||||
| 	"github.com/statping/statping/types/metrics" | ||||
| 	"io" | ||||
| 	"io/ioutil" | ||||
| 	"net" | ||||
| @@ -17,6 +16,8 @@ import ( | ||||
| 	"strings" | ||||
| 	"sync" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/statping/statping/types/metrics" | ||||
| ) | ||||
|  | ||||
| var ( | ||||
| @@ -175,6 +176,8 @@ func HttpRequest(endpoint, method string, contentType interface{}, headers []str | ||||
| 	// set default headers so end user can overwrite them if needed | ||||
| 	req.Header.Set("User-Agent", "Statping") | ||||
| 	req.Header.Set("Statping-Version", Params.GetString("VERSION")) | ||||
| 	req.Header.Set("Accept", "text/html") | ||||
|  | ||||
| 	if contentType != nil { | ||||
| 		req.Header.Set("Content-Type", contentType.(string)) | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Hunter Long
					Hunter Long