Comments (5)
// set custom HTTP headers
$curl->option(CURLOPT_HTTPHEADER, [
'Accept: application/json',
'X-Token-Foo-Bar: ABC123' // Pass keys to APIs, for example
]);
from zebra_curl.
// set custom HTTP headers $curl->option(CURLOPT_HTTPHEADER, [ 'Accept: application/json', 'X-Token-Foo-Bar: ABC123' // Pass keys to APIs, for example ]);
Well, I found the problem. I am really using the one you gave me. But I checked the API parameters I'm using and the problem was with authentication. I was using http_authentication () as suggested in the documentation and it didn't work. Then try a direct connection and it looks like it worked using $ curl-> option (CURLOPT_USERPWD, 'username1: password1'); following the parameters here in the documentation for options. Thank you for your attention and congratulations for the work provided here
from zebra_curl.
It should've worked with http_authentication
also as what that does is just setting CURLOPT_USERPWD
the only issue that i can think of is that maybe the 3rd parameter of http_authentication
must be something different than the default CURLAUTH_ANY
- maybe try it CURLAUTH_BASIC
. see the docs
from zebra_curl.
It should've worked with
http_authentication
also as what that does is just settingCURLOPT_USERPWD
the only issue that i can think of is that maybe the 3rd parameter ofhttp_authentication
must be something different than the defaultCURLAUTH_ANY
- maybe try itCURLAUTH_BASIC
. see the docs
Well, with this parameter CURLAUTH_BASIC, it worked perfectly. I appreciate the support. Excellent tool, the caching system helped a lot in the response time of the application I'm using, it's just incredible.
from zebra_curl.
awesome, I'm glad you found it useful!
from zebra_curl.
Related Issues (20)
- Retries Before Failed Using Different Proxies HOT 2
- How do I pass in authentication with a token? HOT 1
- Different options per request HOT 11
- Reusing a Zebra cURL object in the callback triggers timeout HOT 5
- multiple callback handles not working HOT 1
- Non-blocking asynchronous requests? HOT 4
- huge array of URLs leads to many timeout errors HOT 8
- Custom header for each request HOT 1
- different proxy for different url's HOT 10
- Attempt to run with PHP 8.0.0 reports errors HOT 12
- This might be more of a Potential Feature Request than an Issue. HOT 5
- File name too long or not writable
- Array key checking HOT 3
- Some Questions HOT 3
- HTTP Retry? HOT 2
- Setting max load while executing a lot of get requests HOT 1
- Deprecated: Creation of dynamic property Zebra_cURL::$options is deprecated HOT 3
- include zebra_cURL in class HOT 2
- After improvements, please update the version once, otherwise composer will not be able to use the new version. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zebra_curl.