How to send PUT, DELETE HTTP request in HttpURLConnection ?

Hi all.
I want to know that is it possible to send PUT, DELETE request (practically) through java.net.httpURLConnection to http based URL. I have read so many articles describing that how to send GET, POST, TRACE, OPTIONS request but still not finding any sample code which successfully perform PUT and DELETE request. Can any one give idea regarding that?
Thanks

Help_Me_Solve wrote:
Hi all.
I want to know that is it possible to send PUT, DELETE request (practically) through java.net.httpURLConnection to http based URL. I have read so many articles describing that how to send GET, POST, TRACE, OPTIONS request but still not finding any sample code which successfully perform PUT and DELETE request. Can any one give idea regarding that?
ThanksIt's technically possible I am sure but 100% impractical because almost nobody uses an HTTP server for that purpose. I don't know what HTTP servers actually implement PUT and DELETE but you can be sure even in those that do the behaviour is off by default.
If you need to do PUT/DELETE sort of operations you should be using FTP.

Similar Messages

  • How to disable PUT/DELETE method in SMC tomcat

    Hi,
    SMC provides tomcat as the web server to allow logon the SMC console through IE.
    For security consideration, we have to disable the http "PUT" and "DELETE" method of tomcat. Its config file seems to be /opt/SUNWsymon/web/conf/catalina.policy, but I have no knowledge of this file.
    Do anyone know how to disable PUT/DELETE method in tomcat? Or provide me a reference book for this issue?
    Thanks a lot.

    For security consideration, we have to disable the
    http "PUT" and "DELETE" method of tomcat. Its config
    file seems to be
    /opt/SUNWsymon/web/conf/catalina.policy, but I have
    no knowledge of this file.I'm not sure how to disable that feature, but be aware if you disable the ability for Agents to send files to the SunMC web server you may break all Configuration Tasks. Agent config files are sent to the Server by HTTP to allow them to be stored as templates/snapshots.
    I don't remember seeing instructions on how to make the changes you want: the quickest way to find out is probably to call SunMC support.
    Regards,
    [email protected]

  • How to send attachments using HTTP Binding Adapter?

    How to send attachments using HTTP Binding Adapter in Jdeveloper?
    Requirement: I need to send attachments to a system which can communicate with the middleware using https only.
    Kindly suggest..
    Edited by: Richa Juneja on Jan 28, 2013 4:03 AM

    Hi,
    Following links may help U
    /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/29/5bd93f130f9215e10000000a155106/frameset.htm
    to know the basics about soap adapter u cn check out this link
    /people/padmankumar.sahoo/blog/2005/02/15/an-overview-of-soap
    to get in detail about the attachments chk out this link
    hi i am unable to attach an attachment in File to mail scenario
    Regards
    Pullarao

  • How to Recover the Deleted Transport Request

    Hi,
    How to Recover the Deleted Transport Request (Customizing and Workbench).

    Hi Manoj,
    those thins will be done by BASIS people.
    for more info  chekc
    How to recover the deleted Request / task...
    hope it helps you.
    Thanks!

  • How to send a delete request to Q and P systems

    Hi Gurus,
                    I need to delete a report from production. Can anyone please tell me how I can send a delete request from Dev system inorder to delete the report in production?
    I know we need to use trans code RSZDELETE , but will that prompt me to create a delete request?
    Thanks,
    Nip

    Delete the report in Development get the request and transport it by following the same way as you transport all other requests.
    Sarhan.

  • Its urgent...How to implement functions in http request handler ?

    Hello experts,
    I have created http request handler class and  also created service in SICF.
    service and handler class are connected. please guide me how to implement “info”, “get”, “create”, “delete” functions in request handler.

    Hi,
    It seems you go on your way of http basic programming where you need handle the request of info, get, etc. But here you have WDA framework, so you don't need do as the basic ways of http programming. SICF can handle the activated WDA applications, maybe you can call them SERVICES.
    I suggest you go through WDA architecture, tutorials, ... and at last you can find a full demo 'LORD_MAINTAIN_COMP' by SE80.

  • How to send parameters for POST request in AJAX?

    hi friends,
    I am sunil. I am working on ajax.
    My problem is how to send post parameters in AJAX.
    For GET request. I am using bleow and it is workin fine.
    var url = "GetCurrencyRateController?currid="+CurrId+"&lncurrid="+LnCurrID;
    For POST Requert i am sending as
    var url = "GetCurrencyRateController";
    req.send("currid="+CurrId+",lncurrid="+LnCurrID);
    but it is not working

    Check out the Apache HttpClient package and look for how to use the MultipartPostMethod.
    Here is some sample code:
                HttpClient client = new HttpClient();
                MultipartPostMethod filePost = new MultipartPostMethod("http://localhost:8080/MyApp/Push");
                filePost.addParameter("subName", sub.subName);
                filePost.addParameter("serverName", sub.getServerName());
                File file = new File("C:/dataFile.zip");
                filePost.addParameter(file.getName(), file);
                int code = client.executeMethod(filePost);

  • Sending Cookies in HTTP request

    Hi All,
    How can i send a Cookie in HTTP request.
    I have tried methods "addRequestProperty" & "setRequestProperty"
    URL url = new URL("http://hostname.domain");
    HttpURLConnection conn = (HttpURLConnection)url.openConnection();
    //tried in the following ways
    conn.setRequestProperty("Cookie","action=case4");
    conn.setRequestProperty("Cookie:","action=case4");
    conn.addRequestProperty("Cookie","action=case4");
    conn.addRequestProperty("Cookie:","action=case4");
    Cookie header is not present when the request headers are read in the Servlet.
    Thanks in Advance,
    Labora.

    Hi Miciuli,
    Thanks for the response. I am developing a HTTP client in which i need to store the cookies from the response & send it back to the Origin server for the subsequent request. In this scenario, i have to send the Cookies in the HTTP request.
    Thanks,
    Labora.

  • HOW TO USE FUNCTION Deletion of Requests from the Change Log IN PRCSES CHAN

    Respected all
    i used Deletion of Requests from PSA from the prcess chain and found good results, now i have only one request at the psa and thus i am doing good space utililisation. but when i am using Deletion of Requests from the Change Log i am not getting any changes in the request of dso. kindly let me know how to use this 2nd function.
    thanks
    abhay

    Hi Mahodaya,
    As per SAp standards its good to delete the requestes that are no longer needed for the delta update and no longer used ffor inti from the change log table and the data is loaded already in to DSO.
    Goto RSPC
    Click on create New PC -> enter the PC name n long descp
    Next we need to define the start process for the PC.Maintain the start variant process.save n come back.
    for deletion of change log we have option in the Other BW Processes -> deletion of requestes from change log
    Once u select the option we get a dialoge box here we need to create the variant for the process enter the process variant n long descp. cick ok.
    Next in the maintenance screen for the deleting the request from change log table will appear.
    Enter the selection patterns to which the requestes should be deleted from the change log.
    In the maintenance screen, select one or more Data Store objects for which requests are to be deleted from the relevant change log tables under Data Store Object column and select theInfo Area of the corresponding Data Store Objects under Info Area
    If you select the first check box exclude selction pattern, this means that del of requests from change log table will be ignored.
    or
    We can delete the requests which are Older than N-number of days (or) date in the above screen. For this one, enter the number of days (or) date in the filed Older than .
    OR
    If we want to select the requests with a certain status then we can also do in the above screen. We can select the following status indicators from the above screen.
    Delete Successfully Updated Requests Only -This status will delete only requests which
    are successfully updated into corresponding Data Store objects.
    Delete Incorrect Requests that were not Updated - This status will delete only incorrect requests which are not successfully updated into the corresponding Data Store Objects.
    Delete Activation Requests only, No Load requests- This status will delete only the activation requests (requests that begin with ODSR_... ). No load requests are deleted.

  • How to send XML via HTTPS in Servlet

    I am new to Java. I need to make a servlet which can send a message via HTTPS with a content type of XML to another web server when it is called. each msg is proceeded with a header in the following format:
    requestID=rid&userID=uid&password=mypd
    and a detail information in XML:
    <S_Request>
    <requestControllID>1-rf200</requestControlID>
    <zipCode>99012</zipCode>
    <orderQuantity>35</orderQuantity>
    </S_Request>
    I have basic idea of how to send an http post with parameter string by using the Redirect function but don't know how to deal with the XML detail. Any one has idea about this? Any help will be greatly appreciated!

    This is what I did for one of my projects;
    String myXML = "all the xml tags and fields";
    URL url = new URL("https://www.somesite.com");
    HttpsURLConnection connection = (HttpURLConnection) url.openConnection();
    connection.setDoOutput(true);
    OutputStream outXML = connection.getOutputStream();
    outXML.write(myXML.getBytes());
    I think you can add the requestID and all to the begining of the string myXML
    Good luck
    Rajesh

  • How to send emails to HTTP server?

    hi to all,
    iam dont know how to send a emails & receive emails using
    HTTP server like HOTMAIL,SIFY so and so...
    what is the HTTP host of HOTMAIL and so....?
    and successful with SMTP,IMAP,POP3...
    ITS Urgent,
    Nagaraju G

    hi to all,
    iam dont know how to send a emails & receive emails using
    HTTP server like HOTMAIL,SIFY so and so...
    what is the HTTP host of HOTMAIL and so....?
    and successful with SMTP,IMAP,POP3...
    ITS Urgent,
    Nagaraju G

  • How to retrieve the deleted Transport request (Cust)

    Hi,
    I have deleted the Customizing Transport Request, by mistake. Now, I am trying to get the TR back.
    Could you please let me know if there is any way that I can recover my Transport Request.
    Thanks for the helpful answers.
    PS: I have checked the existing threads for the same. However, I don't see any solution.
    Thanks,
    Sandeep

    Hi Sandeep,
    It;s good if you can involve BASIS consultant or you can check below discription;
    If you have deleted from SAP level. Then you need to check at the OS level in /usr/sap/trans/log directory else you can check for the SLOG and ALOG folder also.
    If total request has been deleted then you can also do the transport manually at OS level.
    or
    If you have simply deleted the the requests from import queue through "Extras-> Delete imported requests" in transaction STMS_IMPORT and have not deleted the logs at OS level, then you can check in "Goto-> Import History" in the same transaction to view the requests.
    Just double click on the request you want and you enter the "Display Object List" screen for the particular request. 
    Here you can click on the secong "Spectacles" icon to display the transport steps of the request in each of your SAP system.
    Just double click on a step, e.g. 'Import', 'Check Version','Export' etc. to display the log for that particular step.
    You can also view the logs from operating system in the directory <TRANSDIR>/log. The logs are named in the format: 
    <Source SID><Step ID><Request no>.<Target SID>, where step ID is a single alphabet denoting a particular transport action.
    Or you can check below link also;
    How to recover the deleted Request / task...
    Regards,
    Kamfrk.

  • CUP. How to remove a deleted active Request Type from Request Access screen

    Hi,
    I created a new Request Type in CUP, assigned actions, marked it active and saved.
    I then deleted the Request Type without first marking it as inactive.
    The request type is still visible on the 'Request Access' page but no longer visible on the 'Request Type' screen in Configuration.
    Is there a way to remove this from the 'Request Access' page without rebooting?
    Thanks,
    Babak

    Dude I just helped you pass the 1000 point barrier.
    Excellent answer, refreshing the cache in the Miscellaneous section worked.
    Well done.

  • TS3276 How to send a return receipt request?

    How do i set up an email to send me a notification when the recipient opens it?

    Mail doesn't nativel support such things. If this still works, you can add a header that will request the read receipt, but it will be for every email you send: http://email.about.com/od/macosxmailtips/qt/et_request_recp.htm
    Since most email clients either disable this by default or don't support it at all (like Mail), you will only know if you get a positive response. If you do not get a read receipt, it has little bearing on whether the person read the email or not.

  • How to display response of http request as a web page in ABAP?

    Hi all,
    In ABAP, we can use class <b>cl_http_client</b> to send a http requst and then got the response data as a XSTRING variable. Usually, the response data is the html source of a web page. How to display this web page within dynpro?
    I found we can use class <b>cl_gui_html_viewer</b> to display the web page of a URL or data in SAP web respository. Is there any way of using it to load response data in cl_http_client and display that web page?
    Thanks a lot.

    Welcome to SDN.
    1. use http_client->response->get_cdata( ).
    to get the response data in string format instead of xstring format.
    2. use FM CONVERT_STRING_TO_TABLE to covert the string to table of type W3HTML
    3. use method
    data: l_doc_url(255) type c.
          call method html_control->load_data
                      exporting
                         type         = 'text'
                         subtype      = 'html'
                      importing
                         assigned_url = l_doc_url
                      changing
                         data_table   = html_table.
    call method html_control->show_data
                      exporting
                         url       = l_doc_url.
    to load the html content and show it in cl_gui_html_viewer
    Regards
    Raja

Maybe you are looking for

  • Start node manager using WLST

    I am trying to start node manager using WLST with following command wls:/offline> nmConnect('weblogic','weblogic123','localhost','5556','FirstDomain','C:\Oracle\Middleware\user_projects\domains\FirstDomain','plain')but getting below exception Traceba

  • Environmental Veriables in Windows...

    In OAF there are two environmental variables that need to be configured. I am restoring my configuration to a new PC but I don't remember the two variables that need to be setup in order to have it see your workspaces. Does anyone remember off the to

  • Scan my music folder into itune

    Dear Friends: How do I scan my music folder into itune to keep as a album, so that I will able to play from the itune

  • Compression Status of a Request in the cube

    Dear Experts, Can you please let me know  How can I check the compression status of a Request in Inventory cube. for example i have  a request loaded from 2lis_03_bx data source into the 0ic_c03  and i would like to know how the request has been comp

  • Deleting photos in mass

    How do I delete photos IN MASS from my device?  I have 400 photos and need to clear them off but have only found a way to delete them one by one on the device.  From what I can tell, there is no way to delete using the desktop software as well - only