setForceMultiPart

void scrapeableFile.setForceMultiPart ( boolean forceMultiPart ) (professional and enterprise editions only)

Description

Set content type header to multipart/form-data.

Parameters

  • forceMultiPart Boolean representing whether the request contains multipart data (e.g. images, files) as opposed to plain text. The default is false.

Return Values

Returns void.

Change Log

Version Description
4.5 Available for professional and enterprise editions.

This method must be called before the file is scraped.

Occasionally a site will expect a multi-part request when a file is not being sent in the request.

If you include a file upload parameter under the parameters tab of the scrapeable file the request will automatically be multi-part.

Examples

Specify that Request contains Files

 // In script called "Before file is scraped"

 // Will cause the request to be made as a multi-part request.
 scrapeableFile.setForceMultiPart( true );