# Post Request

This section illuminates the procedure for creating and dispatching POST requests via Crawlbase's Smart AI Proxy service.

# Form Data

The below command displays how to send a POST request that carries form data.

  • curl
  • ruby
  • node
  • php
  • python
  • go

Using HTTP:

curl -H 'Content-Type: application/x-www-form-urlencoded' \ -F 'param=value' \ -X POST \ -x "http://[email protected]:8012" \ -k "http://httpbin.org/anything" 

Using HTTPS:

curl -H 'Content-Type: application/x-www-form-urlencoded' \ -F 'param=value' \ -X POST \ -x "https://[email protected]:8013" \ -k "http://httpbin.org/anything" 

# JSON Data

To send a POST request that includes JSON data, refer to the subsequent command.

  • curl
  • ruby
  • node
  • php
  • python
  • go

Using HTTP:

curl -H "accept: application/json" \ --data '{"key1":"value1","key2":"value2"}' \ -X POST \ -x "http://[email protected]:8012" \ -k "http://httpbin.org/anything" 

Using HTTPS:

curl -H "accept: application/json" \ --data '{"key1":"value1","key2":"value2"}' \ -X POST \ -x "https://[email protected]:8013" \ -k "http://httpbin.org/anything"