Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-874

Override method MultipartEntity.addPart so that applications may use FormBodyPart

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 4.0 Final
    • 4.1 Alpha1
    • HttpClient (classic)
    • None

    Description

      FormBodyPart is similar to Part in HttpClient 3.x in that it couples the form name with the value. Some applications may find this useful, but cannot really utilize these objects since there is only MultipartEntity.addPart(String name,ContentBody) and FormBodyPart does not have a getContent method:

      entity.addPart(part.getName(), part.getContent()); // Almost but there is no getContent method

      How about overriding addPart to take a FormBodyPart object:

      entity.addPart(part);

      Attachments

        1. AddPart.patch
          1 kB
          Gerald Turner

        Activity

          People

            Unassigned Unassigned
            gturner Gerald Turner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: