api-benchmark icon indicating copy to clipboard operation
api-benchmark copied to clipboard

Ability to provide a client side certificate

Open seesharper opened this issue 8 years ago • 5 comments

Hi!

Is there somehow I can provide a client side certificate when hitting an https endpoint?

seesharper avatar Apr 13 '16 08:04 seesharper

Hi @seesharper not at the moment. We use superagent internally for making http calls, and I see a PR in the superagent repo for adding this feature. If that would be merged soon, it would be easy to integrate it here: https://github.com/visionmedia/superagent/pull/681

matteofigus avatar Apr 13 '16 09:04 matteofigus

I see that requests already supports this: https://github.com/request/request#tlsssl-protocol A couple of people asked for switching to request. I am not sure as I like the fact superagent is supersmall and tiny, but perhaps request seems to have more contributions and more features - which for a benchmarking tool could be useful.

matteofigus avatar Apr 13 '16 09:04 matteofigus

Thanks a lot for your quick response and for a really great tool. Love it. Let't hope that the PR gets merged so that client side certificates can be supported. That would really be super useful :)

seesharper avatar Apr 13 '16 09:04 seesharper

Maybe it could be possible to create an abstraction somehow that lets you pick any http client library you want. Somewhere in the lines of just specifying a function that represents the actual HTTP call where that function just redirects to your http client library of choice

seesharper avatar Apr 13 '16 09:04 seesharper

That may be a good idea but realistically complicated to do. Mostly because each module has its own interface and I would just prefer to have the best available in the community rather than add a lot of complexity for a minimal gain.

TBH, when we worked on the first iterations a couple of years ago, superagent and request were equally popular and featured. Nowadays, it looks to me that request has more features and seems to be more maintained and used. So, at this point, I would be more in favour of just switching to request.

I'll open a separate issue for that.

matteofigus avatar Apr 14 '16 10:04 matteofigus