http-post-request including Content-Type and Charset

Author Message

Daniel Scheiner

Wednesday 11 October 2006 7:11:01 am

Hi!

I know that in order to send a HTTP-Request I can make use of eZHTTPTool::sendHTTPRequest().
However I see no parameter that lets me set the Content-Type or the Charset I want to use!
Can I put those into the $postParameters?

Thanks!

Marius Eliassen

Friday 13 October 2006 6:27:58 am

Does not look like it according to the code from the ezhttptool.php class file

        $request = $method . ' ' . $path . ' ' . 'HTTP/1.1' . "\r\n" .
             "Host: $host\r\n" .
             "Accept: */*\r\n" .
             "Content-type: application/x-www-form-urlencoded\r\n" .
             "Content-length: " . strlen( $data ) . "\r\n" .
             "User-Agent: $userAgent\r\n" .
             "Pragma: no-cache\r\n" .
             "Connection: close\r\n\r\n";

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:22:18
Script start
Timing: Jan 31 2025 06:22:18
Module start 'layout'
Timing: Jan 31 2025 06:22:18
Module start 'content'
Timing: Jan 31 2025 06:22:20
Module end 'content'
Timing: Jan 31 2025 06:22:20
Script end

Main resources:

Total runtime1.1396 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.2813151.2266
Module start 'layout' 0.00530.0028 739.507836.6797
Module start 'content' 0.00821.1305 776.1875882.8906
Module end 'content' 1.13860.0009 1,659.07817.9688
Script end 1.1396  1,667.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2818160.0002
Check MTime0.00130.1168160.0001
Mysql Total
Database connection0.00070.059010.0007
Mysqli_queries1.100596.5636540.0204
Looping result0.00050.0428520.0000
Template Total1.098696.420.5493
Template load0.00200.178920.0010
Template processing1.096596.217220.5483
Template load and register function0.00120.105810.0012
states
state_id_array0.00220.189210.0022
state_identifier_array0.00210.186820.0011
Override
Cache load0.00160.1421110.0001
Sytem overhead
Fetch class attribute can translate value0.00060.052420.0003
Fetch class attribute name0.00190.170620.0010
XML
Image XML parsing0.00030.022520.0001
class_abstraction
Instantiating content class attribute0.00000.000620.0000
General
dbfile0.00070.0620100.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs