UNPKG

httppize

Version:

Access as http any https resource. Let it be https with self sign certificate or https with client certificate or regular https

57 lines (36 loc) 2.56 kB
# HTTPpize A proxy that handle https for you, even with https with client certificate. [Brazilian Portuguese](https://github.com/fernandobhz/httpizar) # Motivation In Brazil, the eletronic invoice systems uses a "self-sign" certificate and client certificates. Better explanation: Brazil has your own Certificate Autorit, so most libraries recognize that certs as "self-sign". Beyond that, is not very common client certificates. So, most programmers get lost trying to talk with gov servers (Sefaz or Town halls). Some times ago, I publish some videos trying to help others developers [Efetuando consulta de notas fiscais eletronicas emitidas (nfse) via webclient](https://www.youtube.com/watch?v=esD7hIJORVI&t=173s) [Efetuando consulta de notas fiscais eletronicas emitidas (nfse) via web services](https://www.youtube.com/watch?v=HBSLTN0P4LM&t=1s) [Efetuando consulta de notas fiscais eletronicas emitidas (nfse) via wcf](https://www.youtube.com/watch?v=OFU8dfHqQlU&t=1s) [Como referenciar webservice nota fiscal eletronica (nfse) de belo horizonte no visual studio 2013](https://www.youtube.com/watch?v=mHu9YuoxVgk) # Installation npm install -g httppize # Usage httppize 8443 www.some.domain.com cert.pem # Example with a gov server httppize 8443 homologacao.sefaz.mt.gov.br cert.pem Now we can make calls to http://localhost:8443/nfews/v2/services/NfeInutilizacao4?wsdl HTTpize will hande for the call to https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeInutilizacao4?wsdl If that helps you, think about make a donation to me :) # Pfx to Pem To convert pfx to pem I use that tool [https://www.sslshopper.com/ssl-converter.html](https://www.sslshopper.com/ssl-converter.html) Use at your own risk, that is third party tool # Credits [www.fernandobhz.com.br](http://www.fernandobhz.com.br) [www.fernandobhz.com](http://www.fernandobhz.com) [fernandobhz.github.io](http://fernandobhz.github.io) # Donate [![paypaldonate](https://www.paypalobjects.com/pt_BR/BR/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RNDJKX9J6TBRW) # Live demo The example above is avaliable at: http://www.fernandobhz.com.br:8443 So making a request to http://www.fernandobhz.com.br:8443/nfews/v2/services/NfeInutilizacao4?wsdl Will point to https://homologacao.sefaz.mt.gov.br/nfews/v2/services/NfeInutilizacao4?wsdl Please note, in that way, are you using my certificate to talk, use only for testing