Error Messages/46311

Warning message

A Content-Type of application/json is specified in the «httpHeaders» parameter of ReadFromURL, but it is a multipart message, either because the «formValues» contain an image or binary data (that require a multipart message to send) or because «fieldHeaders» is specified. A multipart message needs a Content-Type:multipart/form-data, or some other subtype of multipart. You can omit the Content-Type from «httpHeaders» and multipart/form-data will be used.

Description

When calling ReadFromURL, you can optionally specify HTTP headers in the «httpHeaders» parameter. You might do this, for example, when calling a web service call. Since this message appears, it appears that you have in fact specified some custom http headers, one of which was:

Content-Type: application/json

If your own error message, it might be a different content type. The warning occurs when you are sending a multipart message, in which case the http header needs to start with multipart, for example:

Content-Type: multipart/form-data

The primary type must be multipart, a few other subtypes used with HTTP protocols include form-data, mixed, alternative, related, parallel, signed, encrypted and byteranges. You don't have to specify any Content-Type because ReadFromURL will automatically set it to multipart/form-data when it sees that the message is multipart. If you specify a Content-Type, then it will use the one you specify as long as the primary type is multipart.

Your message (HTTP request) becomes a multipart message when:

  • «formValues» is specified and at least one form value needs its own part. This is the case for binary data types like images.
  • «formHeaders» is specified -- this is an array of HTTP headers for each part in a multipart message. By specifying this it implies you expect this to be sent as a a multipart message.
Comments


You are not allowed to post comments.