Skip to main content
Question

POST in Webhook Data fields get formatted as a one string issue when posted with a file object

  • 14 June 2024
  • 1 reply
  • 26 views

Hi!

I've encountered an issue when using Webhook (POST). When I include a file object in the POST request, the data field options get formatted as a single string, like this:
Array ( [data] => client_id=3&order_number=12345 )

However, when I don't include a file object, the data field options are sent separately, which is the desired format:
Array ( [client_id] => 3 [order_number] => 12345 )
 

 When I passed data and file together

Result → Array ( rdata] => client_id=3&order_number=12345 )

When I pass data only


Result→Array ( Aclient_id] => 3 =order_number] => 12345 )

I want my data fields get passed in this way even after including a File object

Is there a way to send the data field options separately even when I POST a file object together?

FYI,
My API is developed using PHP and used print_r($_POST); to check how the data fields get passed to my API

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply