Home NetLinx Modules & Duet Modules

HTTPS request with Duet ?

Hi

I need for a NetLinx module to do a GET requist on an HTTPS server. I know it's impossible to do in NetLinx code so I planned to use a Duet module to generate the HHTPS request (it's used to generate a token). Would someone have some codes to share ? I don't want to reinvent basic stuff and not much time to go deep in Duet and Java docs !

Thanks

Vincèn

Comments

  • AMXJeffAMXJeff Senior Member Posts: 450
    vincen wrote: »
    Hi

    I need for a NetLinx module to do a GET requist on an HTTPS server. I know it's impossible to do in NetLinx code so I planned to use a Duet module to generate the HHTPS request (it's used to generate a token). Would someone have some codes to share ? I don't want to reinvent basic stuff and not much time to go deep in Duet and Java docs !

    Thanks

    Vincèn

    HTTPS is possible but will only be reliable with the new controllers.
  • vincenvincen Junior Member Posts: 526
    AMXJeff wrote: »
    HTTPS is possible but will only be reliable with the new controllers.
    I have one that's why I'd like to test it to check how fast/slow it is ;) and I need to do it only one time at startup of module to retrieve an identification token !
  • mstocummstocum Junior Member Posts: 119
    vincen wrote: »
    I have one that's why I'd like to test it to check how fast/slow it is ;) and I need to do it only one time at startup of module to retrieve an identification token !

    I'd recommend using the httpclient module from Apache Commons. It can be a bit of a pain to compile against the Duet SDK, but if you download the 4.x RMS SDK you can grab the 4 commons- JARs from it, and include them in your project. Just make sure you're looking at the version 3.1 documentation from Apache Commons. My experience with the NI series controllers is that it's SLOOOOOOW. Roughly 10 seconds per request. From what I've heard of the NX controllers, I'd expect it to be much much faster.
  • vincenvincen Junior Member Posts: 526
    mstocum wrote: »
    I'd recommend using the httpclient module from Apache Commons. It can be a bit of a pain to compile against the Duet SDK, but if you download the 4.x RMS SDK you can grab the 4 commons- JARs from it, and include them in your project. Just make sure you're looking at the version 3.1 documentation from Apache Commons. My experience with the NI series controllers is that it's SLOOOOOOW. Roughly 10 seconds per request. From what I've heard of the NX controllers, I'd expect it to be much much faster.
    Thanks for pointing to this, so I installed the RMS*SDK and found then an http.jar class but nothing using it or documentation so completely lost on how I can use it in my own programs ! Opened the RMS project included in SDK but nothing helpful there :(
Sign In or Register to comment.