Welcome!

Eclipse Authors: Liz McMillan, Lacey Thoms, Jayaram Krishnaswamy, RealWire News Distribution, Lev Lesokhin

Related Topics: Websphere, Java, Eclipse, Apache

Websphere: Article

WebSphere Datapower Configurations for HTTP (GET and POST) Requests

Configuring Datapower services for the browser-based HTTP type requests

Testing:

1. For testing, enabled the probe on the HTTPBrowserMPGW

2. Create the Http_POST-request.html file and type the following. This file submit request using POST HTTP Method.

<html>

<head />

<body>

<H2>Http_POST-request.html</H2></br>

<form name="form1" action="http://10.235.26.51:81" method="post">

Type any text: <input name="anyText">

<input type="Hidden" name="emailAddr" value="[email protected]" >

<input type="submit" value="Submit" />

</form>

</body>

</html>

3. Now, create the Http_GET-request.html file and type the following. This file submit request using GET HTTP Method.

<html>

<head />

<body>

<H2>Http_GET-request.html</H2></br>

<form name="form1" action="http://10.235.26.51:81" method="get">

Type any text: <input name="anyText">

<input type="Hidden" name="emailAddr" value="[email protected]" >

<input type="submit" value="Submit" />

</form>

</body>

</html>

4. Open Http_POST-request.html file in Internet Explorer (IE), type some message and click on Submit

5. After clicking Submit, it will show the successful message

6. Refresh the Datapower probe, you should see the HTTP Post request

7. Now, open Http_GET-request.html file in Internet Explorer (IE), type some message and click on Submit

8. After clicking Submit, it will show the successful message

9. Refresh the Datapower probe

10. Notice difference between two requests. HTTP Post uses the message body to submit the request while HTTP GET uses the URI.

More Stories By Asim Saddal

Asim Saddal works in the Middleware (WebSphere Application Server, WebSphere Datapower, WebSphere Process Server, WebSphere VE) practice of IBM Software Services for WebSphere.