monaco-io / request Goto Github PK
View Code? Open in Web Editor NEWgo request, go http client
Home Page: https://pkg.go.dev/github.com/monaco-io/request?tab=doc
License: MIT License
go request, go http client
Home Page: https://pkg.go.dev/github.com/monaco-io/request?tab=doc
License: MIT License
Its the best request library right now
https://gist.github.com/bgbusted/698a76a42794364238ed0eb2b91e6186
my issue is one thing the HEADERs goes by the ABC ?
how can I make it like chrome ?
I already got the fingerprint done but I still have issues with the headers its not as it is on chrome :)
x509: certificate signed by unknown authority
Is there a way to disable it?
i think is in the http context to operate it . it is necessary to add setproxy function.
Can you provide something like this?
client.SendWithCtx(ctx)
Thank you!
Is it possible to send POST request with []byte body similar to BodyString? Should I make new plugin?
Hey, I am trying to pass in a non default http client. Similar to something like this:
defaultRoundTripper := http.DefaultTransport
defaultTransportPointer, ok := defaultRoundTripper.(*http.Transport)
if !ok {
panic(fmt.Sprintf("defaultRoundTripper not an *http.Transport"))
}
defaultTransport := *defaultTransportPointer // dereference it to get a copy of the struct that the pointer points to
defaultTransport.MaxIdleConns = 100
defaultTransport.MaxIdleConnsPerHost = 100
myClient = &http.Client{Transport: &defaultTransport}
I don't see any way that is obvious but I'm open to making some minor changes, for example making it public public in the request.Client struct. Is there a way that would make sense to you and I could submit a PR?
c = request.Client{
Context: context.Background(),
Method: "POST",
URL: url,
Timeout: TIMEOUT,
ProxyURL: "http://127.0.0.1:8080",
URLEncodedForm: "username=admin&password=123456",
}
resp = c.Send()
resp.Code() # 200
建议和其他主流http request库做个性能对比,能更直观的做出选择,在使用方便的同时能兼顾性能。
Hello, you have great library there. I found something very unsettling. If connection doesnt happen(host down), calling sugar.Code() causes nil pointer panic because Response member is nil. Would you consider preventing that? Something like
func (s *Sugar) Code() int {
if s.ctx.Response == nil {
return 0
}
return s.ctx.Response.StatusCode
}
Hello,
Is there any options or settings similar to "SetDoNotParseResponse"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.