mirror of
https://github.com/foss42/apidash.git
synced 2025-08-06 05:32:26 +08:00
added further basic templates for headers and request creation
This commit is contained in:
@ -16,6 +16,22 @@ class PHPcURLCodeGen {
|
||||
|
||||
\$request = curl_init(\$uri);
|
||||
|
||||
""";
|
||||
|
||||
//specifying headers
|
||||
String kTemplateHeaders = """
|
||||
|
||||
\$headers = [{{headers}}];
|
||||
curl_setopt(\$request, CURLOPT_HTTPHEADER, \$headers);
|
||||
|
||||
""";
|
||||
|
||||
//request template
|
||||
String kTemplateRequest = """
|
||||
|
||||
curl_setopt(\$request, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt(\$request, {{method}}, 1);
|
||||
|
||||
""";
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user