You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by COURTAULT Francois <Fr...@gemalto.com> on 2018/02/14 17:20:15 UTC

Help regarding HTTPCore 4.4 and Robot Framework

Hello,

I have built a simple HTTPS server using as a basis the "Synchronous HTTP file Server" in java: everything worked fine.

Indeed, in this HTTPS server prototype, using the HTTP Core api , I have registered a HTTPRequestHandler using the registerHandler method on a dedicated URI.

Just also want to mention that using the fluent api, I haven't set any HttpProcessor as it is the case in the "Synchronous HTTP file Server" sample but not in the Embedded HTTP server sample located at https://hc.apache.org/httpcomponents-core-4.4.x/tutorial/html/blocking-io.html#d5e394 .



Using my java prototype, if I send  a HTTP request to the URI  which has been registered using the registerHandler method, the code inside the HTTPRequestHandler.handle method is triggered as expected.



Then I use Jython 2.7 environment to build the same proto. Same behavior: the code inside the HTTPRequestHandler.handle method is triggered as expected.



Finally, reusing the same code but in a Robot Framework environment, the code inside the HTTPRequestHandler.handle method is not triggered :(

Any advice to find the root cause ? What kind of settings should I use in order to have some debug logs which can help me to understand what's going wrong ?
Any other idea ?

Best Regards.

RE: Help regarding HTTPCore 4.4 and Robot Framework

Posted by COURTAULT Francois <Fr...@gemalto.com>.
Hello,

I have solved the issue I have.
There is a conflict between with the robot.api.logger and HttpCore. Indeed, replacing the logger.info/error/warn by print, I was able to see that the HTTPRequestHandler I have registered is called.

Best Regards.

-----Original Message-----
From: COURTAULT Francois [mailto:Francois.Courtault@gemalto.com] 
Sent: mercredi 14 février 2018 18:20
To: HttpClient User Discussion <ht...@hc.apache.org>
Subject: [++SPAM++]: Help regarding HTTPCore 4.4 and Robot Framework

Hello,

I have built a simple HTTPS server using as a basis the "Synchronous HTTP file Server" in java: everything worked fine.

Indeed, in this HTTPS server prototype, using the HTTP Core api , I have registered a HTTPRequestHandler using the registerHandler method on a dedicated URI.

Just also want to mention that using the fluent api, I haven't set any HttpProcessor as it is the case in the "Synchronous HTTP file Server" sample but not in the Embedded HTTP server sample located at https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhc.apache.org%2Fhttpcomponents-core-4.4.x%2Ftutorial%2Fhtml%2Fblocking-io.html%23d5e394&data=02%7C01%7CFrancois.Courtault%40gemalto.com%7C1d5fc4a0312c4c59ec3808d573cf4057%7C37d0a9db7c464096bfe31add5b495d6d%7C1%7C0%7C636542256333743919&sdata=xlNEpgHT%2FRwpCAASoBGa4T42U66FU02j5rjFlnaMJ1E%3D&reserved=0 .



Using my java prototype, if I send  a HTTP request to the URI  which has been registered using the registerHandler method, the code inside the HTTPRequestHandler.handle method is triggered as expected.



Then I use Jython 2.7 environment to build the same proto. Same behavior: the code inside the HTTPRequestHandler.handle method is triggered as expected.



Finally, reusing the same code but in a Robot Framework environment, the code inside the HTTPRequestHandler.handle method is not triggered :(

Any advice to find the root cause ? What kind of settings should I use in order to have some debug logs which can help me to understand what's going wrong ?
Any other idea ?

Best Regards.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org