Loading ...
Sorry, an error occurred while loading the content.
 

connection.js - content type

Expand Messages
  • Vadim Zaliva
    Hi! I am using connection.js, which I found to be very useful. However in our project we POST XML documents to the server. Unfortunately connection.js have
    Message 1 of 4 , Mar 5, 2006
      Hi!

      I am using connection.js, which I found to be very useful. However in our project we POST
      XML documents to the server. Unfortunately connection.js have 'application/x-www-form-
      urlencoded' content-type hard-coded.

      I have done a trivial modification to connecton.js which allows to specify additional parameter
      for content type of posted data. For example we use it with 'text/xml'. I hope this patch will
      be useful others developers and maybe it could even make it into the next release. You can
      download it from the following URL:

      http://codeminders.com/patches/connection-content-type.diff

      Vadim
    • Thomas S. Sha
      ... in our project we POST ... application/x-www-form- ... specify additional parameter ... text/xml . I hope this patch will ... next release. You can ...
      Message 2 of 4 , Mar 5, 2006
        --- In ydn-javascript@yahoogroups.com, "Vadim Zaliva" <lord@...> wrote:
        >
        > Hi!
        >
        > I am using connection.js, which I found to be very useful. However
        in our project we POST
        > XML documents to the server. Unfortunately connection.js have
        'application/x-www-form-
        > urlencoded' content-type hard-coded.
        >
        > I have done a trivial modification to connecton.js which allows to
        specify additional parameter
        > for content type of posted data. For example we use it with
        'text/xml'. I hope this patch will
        > be useful others developers and maybe it could even make it into the
        next release. You can
        > download it from the following URL:
        >
        > http://codeminders.com/patches/connection-content-type.diff
        >
        > Vadim

        Thanks for the contribution. We may re-evaluate it as a default value.

        The default of "application/x-www-form-urlencoded" can be overridden
        if you set your own header before calling asyncRequest by setting your
        own values via initHeader.

        Regards,
        Thomas
      • Thomas S. Sha
        ... in our project we POST ... application/x-www-form- ... specify additional parameter ... text/xml . I hope this patch will ... next release. You can ...
        Message 3 of 4 , Mar 6, 2006
          --- In ydn-javascript@yahoogroups.com, "Vadim Zaliva" <lord@...> wrote:
          >
          > Hi!
          >
          > I am using connection.js, which I found to be very useful. However
          in our project we POST
          > XML documents to the server. Unfortunately connection.js have
          'application/x-www-form-
          > urlencoded' content-type hard-coded.
          >
          > I have done a trivial modification to connecton.js which allows to
          specify additional parameter
          > for content type of posted data. For example we use it with
          'text/xml'. I hope this patch will
          > be useful others developers and maybe it could even make it into the
          next release. You can
          > download it from the following URL:
          >
          > http://codeminders.com/patches/connection-content-type.diff

          I've added this contribution to the feature queue for connection
          manager, to remove the default content-type for POST.

          Regards,
          Thomas
        • Vadim Zaliva
          ... Your approach works under IE and Safari, but not under FireFox. Looks like once you set a header there, subsequent changes with different values does not
          Message 4 of 4 , Mar 7, 2006
            --- In ydn-javascript@yahoogroups.com, "Thomas S. Sha" <tsha@...> wrote:

            > The default of "application/x-www-form-urlencoded" can be overridden
            > if you set your own header before calling asyncRequest by setting your
            > own values via initHeader.

            Your approach works under IE and Safari, but not under FireFox. Looks like once you set a
            header there, subsequent changes with different values does not take effect.

            Vadim
          Your message has been successfully submitted and would be delivered to recipients shortly.