Commit Graph

54 Commits

Author SHA1 Message Date
Victor Vazquez
68ee875fca
Legal/adding notice for libcurl sample (#372)
* Adding libcurl sample usage to Notice
2020-09-04 14:15:35 -07:00
Victor Vazquez
caf705c863
reuse code from tolower char (#583)
* reuse code from tolower char

* c_LocaleInvariant table to do tolower instead of toUpper
2020-09-03 22:46:28 -07:00
Victor Vazquez
38d90d62f3
URL encode and URL Unification (#561)
* Update URL from CORE with uri builder from storage and make Request to take URL to be created
2020-09-02 23:57:03 -07:00
Victor Vazquez
6e33262be5
Fix for connection re-use on response error (#548)
* Fix for connection re-use on response error
2020-08-27 22:45:33 -07:00
Victor Vazquez
1f0da6fcc4
Clean routine (#530)
* adding cleaner routine
2020-08-26 16:51:24 -07:00
Rick Winter
c5438d623b
Restructure the azure inc folder (#514)
* Restructure the azure inc folder
2020-08-25 20:08:34 -07:00
Victor Vazquez
760c645af0
remove double checking mutex (#528) 2020-08-25 15:52:02 -07:00
Victor Vazquez
80f2c2f407
Reuse connection when calling ReadToCount() (#518)
* change EOF for IsEOF function to avoid setting EOF after checking read everytime

* fix setting size to read

* move IsEOF to be private

* Update comment about not moving a connection back to the pool
2020-08-25 10:06:47 -07:00
Victor Vazquez
70eeec5984
Connection pool for keep alive (#500)
* keep-alive. reuse same connection based on host
2020-08-21 15:41:45 -07:00
Victor Vazquez
5cb3a644a4
Thow runtime error if reading fails at FileStream (#481)
* Handle non eof errors on Windows

* trhow on pread error for linux

* adding errno.h to fix macOS
2020-08-18 15:16:47 -07:00
Victor Vazquez
e031696bce
handle size 0 chunked response (#451) 2020-08-14 09:57:42 -07:00
Victor Vazquez
311902fe25
Fix waitforsocket usage when receiving from socket (#453) 2020-08-14 09:03:54 -07:00
Anton Kolesnyk
cc78776bcb
EnvironmentCredential with ClientSecretCredential support (#442) 2020-08-13 14:28:08 -07:00
Rick Winter
1a32179fec
Create template project (#443)
* Create template project
Support retrieving version from code
2020-08-12 15:08:46 -07:00
Anton Kolesnyk
83174eeec3
Context tweaks (#378) 2020-08-11 17:11:27 -07:00
Anton Kolesnyk
302bbf251e
Add authority URL support for ClientSecretCredential (#424) 2020-08-11 11:22:09 -07:00
Victor Vazquez
a5c3f10b7d
204 http client support (#408)
* 204 http client support

* adding test for 204 response
2020-08-06 09:00:09 -07:00
Victor Vazquez
eeffd6248f
update context to const ref (#389) 2020-08-04 09:45:13 -07:00
Victor Vazquez
fb729fcf10
Http/download on error (#376)
* Download body on error response codes from request

* Adding test case for downloading body
2020-07-31 22:11:31 -07:00
Anton Kolesnyk
4bf1f62ba8
Core logging infrastructure + logging policy + retry logging (#330) 2020-07-31 16:43:47 -07:00
Victor Vazquez
6e3c3d9acf
avoid making a copy from vectorBody (#364) 2020-07-29 00:50:55 -07:00
Victor Vazquez
9563d9dd3c
Http/making upload chunk size overridle with Request option (#342)
* adding http request option to customize the upload chunk size for bodyStream
2020-07-29 00:16:36 -07:00
Victor Vazquez
d9e39a0e6e
Http/moving DownloadViaStream option to request (#362)
* move DownloadViaStream option to Request

* Fix credentials request

* Fix unit tests

* use constructor instead of set method

* fix tests
2020-07-28 14:10:26 -07:00
Victor Vazquez
ef0c530ee0
Pipeline/download content on pipeline to let Retry policy to handle read/get issues (#323)
make upload chunk size custumizable
2020-07-27 11:40:40 -07:00
Anton Kolesnyk
b259db5a3b
Telemetry policy (#264) 2020-07-17 17:03:47 -07:00
Victor Vazquez
6122529bac
Core/response t (#316)
* rename http response to RawResponse

* Adding Response T
2020-07-17 14:43:17 -07:00
Rick Winter
bbbaa06b5c
Exception objects should be thrown and not the pointer to the exception object. (#322)
Exception objects should be thrown and not the pointer to the exception object. 
   https://azure.github.io/azure-sdk/cpp_design.html#c-exceptions
The pattern for the catch expects a reference to the exception and not the pointer.

Example:
try{
   throw Myxception();
}
catch (MyException const& e) {  //process  }
2020-07-16 15:44:34 -07:00
Victor Vazquez
12b389a579
Http/throw on read error (#274)
* throw exception on Read from wire Error instead of returning -1

* throw exception if read from socket is not CURLE_OK

* missing header for Win

* fix header on windows

* Add more description to transport errors
2020-07-15 10:27:38 -07:00
Victor Vazquez
0eacb230cb
Http/fix reading more than content (#311)
* Fix reading more data than content length

* fix for head request
2020-07-14 16:38:20 -07:00
Victor Vazquez
c0faea5f90
Http transport adapter - read all chunks from server until chunkSize is zero (#273)
* fix for getting all chunks from a chunked response until chuksize is zero

* fix for pulling from wire when inner buffer is empty
2020-07-13 23:00:23 -07:00
Victor Vazquez
05c91d6002
Http/missing change for to lower (#279)
* throw exception on Read from wire Error instead of returning -1

* missing change for tolower
2020-07-13 22:02:32 -07:00
Victor Vazquez
57bdc0f6d6
Adding toLower for header names and unit testd (#270) 2020-07-13 17:21:08 -07:00
Victor Vazquez
59d7ebabe1
Http/fix gcc 8 build (#275)
* throw exception on Read from wire Error instead of returning -1
2020-07-13 17:20:44 -07:00
Victor Vazquez
c699888daa
Make sure Read will always start on body start. (#256)
* make stream use int64_t instead of uint64_t
2020-07-10 23:02:18 -07:00
Anton Kolesnyk
43dcc6c495
Retry policy (#241) 2020-07-10 00:23:40 -07:00
Billy O'Neal
f6defdf25a
Add tests and locale invariant string equal function in support of the 'extensible enum' guideline. (#197)
* Add locale invariant string equal function in support of the 'extensible enum' guideline.

* Resolve gcc narrowing warning.

* Fix case flipping table to go the correct direction 😳

* organize tests and add one test for invariant locale compare as exaple

* Add more test cases.

* Move to Details namespace.
2020-07-08 22:34:29 -07:00
Victor Vazquez
9fb4119ccb
Memory Stream - File Stream (win/lin) - HTTP Request / Response - Updates (#236)
* make stream use int64_t instead of uint64_t
2020-07-03 22:22:16 -07:00
Victor Vazquez
d58cbad14d
Unique ptr for body stream (#214)
* change bodyStream to unique ptr
2020-06-29 10:33:31 -07:00
Anton Kolesnyk
ad2e63afe1
Remake ClientSecretCredential (#212) 2020-06-27 15:27:11 -07:00
Victor Vazquez
e1e88b3984
Support for requests with no body (#202)
* avoid fail if no body in request

* request with no body

* fix for win86

* Update sdk/samples/http_client/curl/src/azure_core_with_curl_bodyBuffer.cpp

Co-authored-by: Rick Winter <rick.winter@microsoft.com>

Co-authored-by: Rick Winter <rick.winter@microsoft.com>
2020-06-22 18:38:35 -07:00
Victor Vazquez
90345e090c
fix the number of bytes that are read by stream (#203) 2020-06-22 18:24:09 -07:00
Victor Vazquez
e5e063f88c
support no path request (#201) 2020-06-22 18:23:42 -07:00
Victor Vazquez
614fa143ba
adding host header automatically if missing for libcurl transport (#200) 2020-06-22 18:23:30 -07:00
Victor Vazquez
90e57362bf
Victor/http/add streams (#183)
* Adding body Stream for HTTP
* Adding libcurl session with custom send and receive
2020-06-18 21:43:00 -07:00
JinmingHu
11f842bfbe
Add support for HTTP methods to unblock storage team (#158)
* Support all HTTP methods

* Add const qualifier

* fix compiler error on some platforms
2020-06-04 09:44:40 -07:00
Rick Winter
602f75744a
HttpPipeline and HttpPolicies (#63)
* HttpPipeline
2020-05-29 10:57:10 -07:00
Victor Vazquez
c19f9e2b05
Adding writing response from curl to buffer (#64)
* write headers and response code to Response
2020-05-20 14:48:26 -07:00
Rick Winter
5350d1dbf8
Fix namespace case and file formating (#98) 2020-05-12 11:04:59 -07:00
Anton Kolesnyk
55deee50ec
Move scopes to ClientSecret credential, fix multi threading, 'CoW' token that is shared between copies (#62) 2020-04-06 11:08:53 -07:00
Victor Vazquez
61b8cdc3d4
Adding curl and nohttp transport options (#54)
* http client
2020-04-02 11:05:26 -07:00