Hi

At first I thought this wasn't currently possible.
But when I saw that you were using a file with curl, I remembered how the HTTP Post code works, and I think it is possible to do.

If you put the "post body" you want to send in a file, and then reference the filename in the "Filename" field HTTP Request GUI, and not specify any value for "Mimetype" nor "Value for "name" attribute", then the HTTP Post code will send the file content as the only content of the post body.

I think that will work as you expect. If it does not work with Jmeter 2.2, I suggest you try with the latest nightly build, since I have changed the HTTP Post handling in Jmeter a bit lately, but I am not sure if you need the changes I have made, I don't remember exactly.

Note that this discussion is a bit similar to the discussion going on under the subject "$HTTP_RAW_POST_DATA" on this mailing list.

Regards
Alf Hogemark

Thomson, Alex wrote:
All,

I have just started using jMeter v2.2 and am encountering an issue.

I have been using curl to send the following style of HTTP POST to the
system under test:

$ curl -data-binary @/example/file.xml
http://localhost:1234/example/path

(Wireshark packet capture)

Hypertext Transfer Protocol

    POST /example/path HTTP/1.1\r\n

        Request Method: POST

        Request URI: /example/path

        Request Version: HTTP/1.1

    User-Agent: curl/7.12.1 (i386-redhat-linux-gnu) libcurl/7.12.1
OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6\r\n

    Host: localhost:8080\r\n

    Pragma: no-cache\r\n

    Accept: */*\r\n

    Content-Length: 6190

    Content-Type: application/x-www-form-urlencoded\r\n

    \r\n

Line-based text data: application/x-www-form-urlencoded

    <!DOCTYPE EXAMPLE SYSTEM "C:\EXAMPLE.dtd">\r\n

    <Doc>\r\n

      <Asset>\r\n

        <Tag Place="Wonderland" Person="Alice" />\r\n

      </Asset>\r\n

    </Doc>

Is it possible to send this format of HTTP POST using jMeter? It only
seems to support multipart-form POSTs.

Thanks,

Alex Thomson

This email message and any attachments thereto are intended only for use by the 
addressee(s) named above, and may contain legally privileged and/or 
confidential information. If the reader of this message is not the intended 
recipient, or the employee or agent responsible to deliver it to the intended 
recipient, you are hereby notified that any dissemination, distribution or 
copying of this communication is strictly prohibited. If you have received this 
communication in error, please immediately notify the [EMAIL PROTECTED] and 
destroy the original message
This email message and any attachments thereto are intended only for use by the 
addressee(s) named above, and may contain legally privileged and/or 
confidential information. If the reader of this message is not the intended 
recipient, or the employee or agent responsible to deliver it to the intended 
recipient, you are hereby notified that any dissemination, distribution or 
copying of this communication is strictly prohibited. If you have received this 
communication in error, please immediately notify the [EMAIL PROTECTED] and 
destroy the original message.

NDS Limited   Registered office: One Heathrow Boulevard, 286 Bath Road, West 
Drayton, Middlesex, UB7 0DQ, United Kingdom
A company registered in England and Wales   Registered no. 3080780    VAT no. 
GB 603 8808 40-00



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to