Commit Graph

19 Commits

Author SHA1 Message Date
Jocelyn Fiat
f1498e2a07 http_client PUT uploaded data is not correctly implemented using libcurl
so for now, let's use a real temporary file to use the upload filename implementation
2012-05-23 23:17:50 +02:00
Jocelyn Fiat
3a979915f5 Removed HTTP_CLIENT_SESSION.post_multipart .. because it was not doing what the name might evoque
Restrict export of HTTP_CLIENT_REQUEST_CONTEXT.upload_data and upload_filename (and related) to .._SESSION and .._REQUEST
   this is mainly internal data, and is more about implementation than interface
2012-05-04 12:37:51 +02:00
Jocelyn Fiat
4508a76683 Now the http_client will send the form parameters urlencoded if this is possible (instead of multipart form data)
Note for now, the library does not support sending file and form parameters at the same time.
2012-05-04 12:23:37 +02:00
Jocelyn Fiat
eb04ac5405 Improved the libcurl implementation of http_client by adding HTTP_CLIENT_SESSION.is_debug: BOOLEAN
if True, this display verbose debug information in console
Implemented uploading of file for PUT and POST requests
Refactored LIBCURL_HTTP_CLIENT_REQUEST to free used pointer, and also ease extension of the class if needed.
Updated cURL library with addition of {CURL_EXTERNALS}.slist_free_all (..)
2012-05-03 16:21:42 +02:00
Jocelyn Fiat
b541efcc8f Now WGI_RESPONSE.set_status_code (..) has a new argument to pass optional custom reason phrase.
This is a minor breaking change (but prior to the first release, so acceptable)
   And then it is now possible to precise a custom reason phrase (useful for 4xx and 5xx response)

At the WSF_RESPONSE level, the status code is now sent only when the header are sent.
thus, it is possible to change the status code as long as no header is sent.
(in the future, we should also try to delay the sending of headers)

Removed WGI_RESPONSE.put_header_lines (..) which was not used, and WGI is not meant to provide such user friendly features
Now this is available directly on WSF_RESPONSE
2012-04-12 11:19:41 +02:00
Jocelyn Fiat
46eb92ac37 Major renaming, adopt the WSF_ prefix for all classes under "wsf", and simplify some class names
Removed in WGI_INPUT_STREAM, the assertion "same_last_string_reference"
Copyright updates
2012-03-16 09:49:41 +01:00
Jocelyn Fiat
d621987020 Minor correction, to avoid returning 200 as status code, when the client can not connect 2012-02-16 10:32:24 +01:00
unknown
497fe03d38 libcurl: Applied a workaround to avoid issue on Win32 (see LIBCURL_HTTP_CLIENT_REQUEST.apply_workaround)
Separated the http_client-safe.ecf and test-safe.ecf
Added HTTP_CLIENT_SESSION.set_max_redirects
Fixed broken test due to formatting trouble.
2012-02-08 21:32:25 +01:00
Jocelyn Fiat
2b9ca86501 Added proxy, at least to make it is possible to use http://fiddler2.com/ to inspect the traffic. 2012-02-07 15:44:45 +01:00
Jocelyn Fiat
962154fc81 Eventually fixing trouble with c_strlen being over capacity
(added this for testing, and while waiting a fix from EiffelcURL)
2012-02-01 11:57:42 +01:00
Jocelyn Fiat
da9fa4ecc2 Do not add again ctx.headers, since it is already "imported" during the creation of Current request
(see HTTP_CLIENT_REQUEST.make)
2012-01-20 15:37:04 +01:00
Jocelyn Fiat
f6b293d4ae Merge changes from Javier
- update on RESTbuck examples
- new example
- fixed bad typo in WSF_REQUEST

Reverted some changes such as
- http_client_response: keep the headers as a list to handle multiple message-value with same message-name

Fixed simple and simple_file example
Improved HTTP_HEADER

Changed libcurl implementation for http client
- now the header from the context really overwrite any of the session headers
- better design which is more strict, and remove any doubt about context's header usage
2011-12-12 16:03:38 +01:00
jvelilla
c0c206e9ae Update the restbuck_client, still work in progress.
Update restbuck_server, remove unused class in inherit.
Update libcurl_http_client_request, to parse context headers before the
execution.
Update wgi_input_stream, commented precondition.
2011-12-09 21:11:16 -03:00
Jocelyn Fiat
45292e0248 Better implementation to get http header for http_client, and to get list of header entries by key,value 2011-10-31 16:05:34 +01:00
jvelilla
bd36aa8b04 Added headers to response in HTTP_CLIENT_RESPONSE 2011-10-28 14:25:26 -03:00
Jocelyn Fiat
fcdc164214 Added data and file for post and put request methods 2011-10-12 21:45:57 +02:00
Jocelyn Fiat
e5eb11b4e7 added support for data in POST request 2011-10-06 19:09:17 +02:00
Jocelyn Fiat
95ec2e77df Added error reporting in HTTP_CLIENT_RESPONSE
Added missing set_connect_timeout
2011-09-23 18:18:27 +02:00
Jocelyn Fiat
c2f7c198e0 Added simple HTTP client.
For now the implementation is using Eiffel cURL library.
It requires Eiffel cURL coming with next EiffelStudio 7.0 (or from eiffelstudio's repo from rev#87244 )
2011-09-20 16:55:44 +02:00