Avatar of Maverick_Cool
Maverick_Cool
Flag for India asked on

Does RESTFUL webservices support POST method

Hi,
Does RESTFUL webservices support POST method.
1. if yes, are there any limitation
2. if not, why?
Web ServicesJava EEJava

Avatar of undefined
Last Comment
gordon_vt02

8/22/2022 - Mon
CEHJ

Maverick_Cool

ASKER
to get a resource , do can we use GET method. The reason is the data will very big, may be 21mb, 2mb...20mb. In any case it will be greater than 255 characters
Maverick_Cool

ASKER
to get or SEND a resource/data , do can we use GET method. The reason is the data will very big, may be 21mb, 2mb...20mb. In any case it will be greater than 255 characters
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
CEHJ

You use GET to retrieve a resource. There's no size limit
Maverick_Cool

ASKER
but as per my knowledge, in GET data is pasted in the url rite.
The limit for length of url is 255 characters.
More over if i have to retrieve more amount of data. How to get it from REST.

Basically simple question is how to retrieve data using HTTP post method using REST.
CEHJ

The length of the url is not related to the length of the data retrievable
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
CEHJ

>>Basically simple question is how to retrieve data using HTTP post method using REST.

And to be clear about the above: you don't retrieve using POST, as the link shows- you use GET
Maverick_Cool

ASKER
"HTTP GET is designed so that all information necessary for the interaction is part of the URI, thus promoting URI addressability..."

and another site explaining difference between GET and POST.
how a browser uri length is max 255 characters. so that means i cant use get lone data passing or recieving. rite?
CEHJ

>>so that means i cant use get lone data passing or recieving. rite?

Sorry - i don't understand the question - please rephrase
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Maverick_Cool

ASKER
What it meant as in GET method, data is transferred as a part of URI/URL and max length URI/URL is 255 characters as HTTP/browser standards. Hence I cannot pass large size data in GET, which also restricts in RESTFUL webservices as we are asked to GET method in it.
CEHJ

>>What it meant as in GET method, data is transferred as a part of URI/URL and max length URI/URL is 255 characters

Yes, but that's only in (arguably incorrectly implemented) normal HTTP. Data are not transferred *at all* using GET in REST. That's what POST is for
Maverick_Cool

ASKER
great. Ther, this is the confusion. Can you explain it bit more how data is transfered in POST, even if call Method is GET.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
CEHJ

POST has a 'message body' in which the data are transferred *from client to server*. See

http://en.wikipedia.org/wiki/POST_(HTTP)
ASKER CERTIFIED SOLUTION
gordon_vt02

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Maverick_Cool

ASKER
hi that gives clear picture. but what i meant by long URI in GET operation means:

http://url....?var1=....(morethan 255 chars)&var2=...(more than 255 chars).........
gordon_vt02

Then yes, I'd recommend sending those parameters as a POST request.  You'll probably make any REST purist cry doing that, but it should work. ;)
Your help has saved me hundreds of hours of internet surfing.
fblack61