<http-param>

HTTP request parameter (form data)

Core v2.2.0

Overview

The processor defines HTTP request parameters for form submissions, API calls, and data posting. Must be used as a child element of . Automatically handles URL encoding and content-type headers.

Usage Examples

Example 1: Login form submission

example-1.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://org.webharvest/schema/2.1/core">
<http url="https://example.com/login" method="POST">
  <http-param name="username">john_doe</http-param>
  <http-param name="password">secret123</http-param>
  <http-param name="remember">true</http-param>
</http>
</config>

Example 2: Search form with dynamic values

example-2.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://org.webharvest/schema/2.1/core">
<def var="searchTerm">web scraping tools</def>

<http url="https://example.com/search" method="POST">
  <http-param name="q">${searchTerm}</http-param>
  <http-param name="category">software</http-param>
  <http-param name="sort">relevance</http-param>
</http>
</config>

Example 3: API data submission

example-3.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://org.webharvest/schema/2.1/core">
<http url="https://api.example.com/submit" method="POST">
  <http-header name="Content-Type">application/x-www-form-urlencoded</http-header>
  <http-param name="name">John Doe</http-param>
  <http-param name="email">john@example.com</http-param>
  <http-param name="message">Hello from WebHarvest!</http-param>
</http>
</config>

Example 4: Multi-value parameters (checkboxes)

example-4.xml
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://org.webharvest/schema/2.1/core">
<http url="https://example.com/preferences" method="POST">
  <http-param name="interests">technology</http-param>
  <http-param name="interests">programming</http-param>
  <http-param name="interests">web-scraping</http-param>
  <http-param name="email">user@example.com</http-param>
</http>
</config>

Parameters

Important Notes

Related Processors