Http get problems

We have a supplier that want (or rather have to) do an HTTP GET request to our server. They cannot change to POST as the system is not their’s to change…

We thought handling a GET to a LS-agent would be simple but for some reason the Domino server cannot handle the ?x=y&etc… request., Probably due to the ?-mark and if we ask them to call the agent using a !-mark the URL is invalid or rather the server think the called agent has a name going all the way to the following ?-mark.

Ie if we use action=“agentname?OpenAgent” the “?OpenAgent”-part is stripped and replaced with “?var=value&var=value” causing the error “Unknown Command Exception”

And if we use action=“agentname!OpenAgent” the server resond “Couldn’t find design note -agentname!OpenAgent”

Anyone with a solution - hope it’s simple and quick to fix :wink: As if is ever is…

Subject: HTTP GET PROBLEMS

The reason that it uses a ! instead of a ? is because the option " make available to web crawlers" is enabled on either your server document or your Internet site document - whichever you are using.

Subject: RE: HTTP GET PROBLEMS

I finally found a workaround concerning this problem, I created a hidden field in the form named OpenAgent…It is not really class but this works…

EG:

Regards,

John

Subject: HTTP GET PROBLEMS

I’m not sure how, but you can change Domino to use the “!” in place of the “?” - perhaps that will allow your URL in the other system to include the !OpenAgent - I’m not sure how the server will interpret the query string appends with the ? though…

I wonder if there is a redirection rule you could use to resolve this. Or maybe if you use the UNID of the agent instead of the normal agent syntax.

Subject: HTTP GET PROBLEMS

What’s the problem with a POST? They don’t need to change anything if your server accepts POST requests. All they need to do is do a form action as follows:

Then tell the agent what to return. Since this is a POST request, the input item values can be accessed by context.Request_Content(0) in the agent. Having said that a GET request shouldn’t be a problem either. Can you post the full url where you call the agent?

Subject: RE: HTTP GET PROBLEMS

Thanks for the answer,

but as I tried to explain the system is not their’s to change and it is a server to server communituion.

Subject: HTTP GET PROBLEMS

You need to have the ?OpenAgent as the first part of your query string if you are passing values.

For example, db.nsf/agent?OpenAgent&param1=x&param2=y

The code of your agent should then parse out each paramater in your query string (which will include OpenAgent).

Ben