HTTP methods and Go URLs

Hello All!

As you know we provide Development and Support/Maintenance Services for Business Intelligence & Analytics.

In this post, we would like to share with you a customer´s request that could be interesting for you in the future. They are using OBIEE 11g as a BI tool.

Let´s introduce the issue. Our customer was sending a huge amount of information via Go URL using a narrative view in his report. The narrative was working as expected but we had a limitation. Using such URL we could only send ~2000 symbols. This length was not enough to cover customer´s requirement.

Background

What is HTTP?

HTTP works as a request-response protocol between a client and server.

Two commonly used methods for a request-response between a client and server are: GET and POST.

The GET Method

Note that the query string (name/value pairs) is sent in the URL of a GET request:

/test/demo_form.asp?name1=value1&name2=value2

The POST Method

Note that the query string (name/value pairs) is sent in the HTTP message body of a POST request:

POST /test/demo_form.asp HTTP/1.1

Host: example.com

name1=value1&name2=value2

The following table compares the two HTTP methods: GET and POST.


GET

POST
Bookmarked Can be bookmarked Cannot be bookmarked
Cached Can be cached Not cached
Encoding type application/x-www-form-urlencoded application/x-www-form-urlencoded or multipart/form-data. Use multipart encoding for binary data
History Parameters remain in browser history Parameters are not saved in browser history
Restrictions on data length Yes, when sending data, the GET method adds the data to the URL; and the length of a URL is limited (maximum URL length is 2048 characters) No restrictions
Restrictions on data type Only ASCII characters allowed No restrictions. Binary data is also allowed
Security GET is less secure compared to POST because data sent is part of the URLNever use GET when sending passwords or other sensitive information! POST is a little safer than GET because the parameters are not stored in browser history or in web server logs
Visibility Data is visible to everyone in the URL Data is not displayed in the URL

 

Business Case

The customer wanted to send a list of customers. The narrative was defined as follow:

Prefix:

<a href = ” http://example/?Data=

Narrative:

pd@1=@15;pt@1=@11:@12:@13;lo@1=@18;la@1=@19;ac@1=@5;tm@1=@16;st@1=@1;pr@1=@6;du@1=@14;

Postfix:

” target=”_blank”><font color=”#6FA458″> Show Detail </font>

</a>

 

The GET method adds the data to the URL and the length of a URL is limited (maximum URL length is 2048 characters). This narrative generated the following URL:

http://example/?Data=pd1=Value1;pt1=Value1;lo1=Value1;la1=Value1;ac1=Value1;tm1=Value1;st1=Value1;pr1=Value1;du1=Value1;pd2=Value2;pt2=Value2;lo2=Value2;la2=Value2;ac2=Value2;tm2=Value2;st2=Value2;pr2=Value2;du2=Value2;pd3=Value3;pt3=Value3;lo3=Value3;la3=Value3;ac3=Value3;tm3=Value3;st3=Value3;pr3=Value3;du3=Value3;pd4=Value4;pt4=Value4;lo4=Value4;la4=Value4;ac4=Value4;tm4=Value4;st4=Value4;pr4=Value4;du4=Value4;pd5=Value5;pt5=Value5;lo5=Value5;la5=Value5;ac5=Value5;tm5=Value5;st5=Value5;pr5=Value5;du5=Value5;pd6=Value6;pt6=Value6;lo6=Value6;la6=Value6;ac6=Value6;tm6=Value6;st6=Value6;pr6=Value6;du6=Value6;pd7=Value7;pt7=Value7;lo7=Value7;la7=Value7;ac7=Value7;tm7=Value7;st7=Value7;pr7=Value7;du7=Value7;pd8=Value8;pt8=Value8;lo8=Value8;la8=Value8;ac8=Value8;tm8=Value8;st8=Value8;pr8=Value8;du8=Value8;pd9=Value9;pt9=Value9;lo9=Value9;la9=Value9;ac9=Value9;tm9=Value9;st9=Value9;pr9=Value9;du9=Value9;pd10=Value10;pt10=Value10;lo10=Value10;la10=Value10;ac10=Value10;tm10=Value10;st10=Value10;pr10=Value10;du10=Value10;pd11=Value11;pt11=Value11;lo11=Value11;la11=Value11;ac11=Value11;tm11=Value11;st11=Value11;pr11=Value11;du11=Value11;pd12=Value12;pt12=Value12;lo12=Value12;la12=Value12;ac12=Value12;tm12=Value12;st12=Value12;pr12=Value12;du12=Value12;pd13=Value13;pt13=Value13;lo13=Value13;la13=Value13;ac13=Value13;tm13=Value13;st13=Value13;pr13=Value13;du13=Value13;pd14=Value14;pt14=Value14;lo14=Value14;la14=Value14;ac14=Value14;tm14=Value14;st14=Value14;pr14=Value14;du14=Value14;pd15=Value15;pt15=Value15;lo15=Value15;la15=Value15;ac15=Value15;tm15=Value15;st15=Value15;pr15=Value15;du15=Value15;pd16=Value16;pt16=Value16;lo16=Value16;la16=Value16;ac16=Value16;tm16=Value16;st16=Value16;pr16=Value16;du16=Value16;pd17=Value17;pt17=Value17;lo17=Value17;la17=Value17;ac17=Value17;tm17=Value17;st17=Value17;pr17=Value17;du17=Value17;pd18=Value18;pt18=Value18;lo18=Value18;la18=Value18;ac18=Value18;tm18=Value18;st18=Value18;pr18=Value18;du18=Value18;pd19=Value19;pt19=Value19;lo19=Value19;la19=Value19;ac19=Value19;tm19=Value19;st19=Value19;pr19=Value19;du19=Valu

 

After our modification of the narrative including POST method as you see below:

Prefix:

<form method=”POST” action=”http://example/”  target=”_blank”>

<input type=”hidden” name=”Data” value=”

Narrative:

pd@1=@15;pt@1=@11:@12:@13;lo@1=@18;la@1=@19;ac@1=@5;tm@1=@16;st@1=@1;pr@1=@6;du@1=@14;

Postfix:

“>

<input type=”submit” value=”Show Detail”>

</form>

 

The url sent was:

http://example.com/

All the information is being sent but the URL does not show all the parameters.

 

We hope this info will be useful!