Jump to content
  • 0

Some Questions About Universal Module


Question

Posted

Hello, I have some questions about universal module. Does it have only POST requests to an API or I can user GET requests too? And what about of using different variables at requests?

4 answers to this question

Recommended Posts

  • 0
Posted
  On 5/7/2014 at 10:23 AM, SimWhite said:

And what about variables? Can I pre-define some and use it at POST requests?

 

Yes, the "Name" that you enter for the fields are passed in the POST request.

 

Label is the name that is displayed, like "Domain Name" and Name is the field name, which could be something like "domain_name". I believe this is a multi-dimensional array however, so you should capture it in your API file using something like.

$response = print_r($_POST, true);
file_put_contents("/path/to/file.txt", $response);

My PHP is rusty, but I think that would work. Make sure file.txt exists and is writable, and after the POST request is made, open the file and see what the array looks like and you'll know where to pull your data from.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...