Uploaded image for project: 'PUBLIC - Liferay Portal Enterprise Edition'
  1. PUBLIC - Liferay Portal Enterprise Edition
  2. LPE-1062

New methods to dynamically set headers when using HttpUtil.URLto*()

Details

    Description

      The current URLtoByteArray() and URLtoString() methods HttpUtil limits the header information that can be used when fetching a URL. To make it easier to set additional header information, two new methods have been added to HttpUtil:

      public byte[] URLtoByteArray(Http.Options options)
      public String URLtoString(Http.Options options)

      The following methods have been deprecated in favor in using the methods above:

      public byte[] URLtoByteArray(String location, Cookie[] cookies, Http.Auth auth, Http.Body body, boolean post)
      public byte[] URLtoByteArray(String location, Cookie[] cookies, Http.Auth auth, Map<String, String> parts, boolean post)
      public String URLtoString(String location, Cookie[] cookies, Http.Auth auth, Http.Body body, boolean post)
      public String URLtoString(String location, Cookie[] cookies, Http.Auth auth, Map<String, String> parts, boolean post)

      Attachments

        Issue Links

          Activity

            People

              support-ee EE Support
              samuel.kong Samuel Kong
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Packages

                  Version Package
                  5.1 EE SP3 (5.1.6)
                  5.2 EE SP1 (5.2.5)