Currently I am on curl version : curl 7.60.0 (x86_64-pc-linux-gnu).
I updated the verision and hitting the following url:
curl -v http://www.google.com
It fails to get response for a linux box.
At the same time if I hit it from windows, with the version curl 7.60.0 (i386-pc-win32), It fetched response.
I would like to know if there is any version instability.
Related
I have problems to get Bearer access token in Jmeter. Problem's cause most probably is in
server authentication - do not really understand how to properly setup this in Jmeter.
curl consist of several parts:
curl -X POST -v https://xxxx.xxx.xx.lv/token -u
"d123c9e3-4e91-46db-931e-37e8a52b8c8d:0e7cb8ad50fe3686de05fcf46815abc0a9d7cd095c23f75446d933ccxyxy"
-d "grant_type=password" -d "username=xxxxxxx" -d "password=xxxxxx" -d "scope=scop"
I have tried to use HTTP AuthorizationManager, HTTP Request and HTTP Header Manager without any successful results. Any advices?
Thanks!
Tatjana
I think you should do something like:
HTTP Request sampler:
these protocol and Server Name bits can be moved to HTTP Request Defaults so you won't have to specify them for each and every HTTP Request sampler
HTTP Authorization Manager:
In general since JMeter 5.1 it's possible to create a test plan from curl command line, the option lives under "Tools -> Import from cURL" main menu entry:
I have the following API:
curl "https://api.prospect.silktide.com/api/v1/report/145b2bec22e731280103639ef580e5f4eb809942" --header "api-key: f92022fc208a3b83fe2aa85d239560f7f0a55823"
It works perfectly fine in terminal, however when I put it on my web browser as:
https://api.prospect.silktide.com/api/v1/report/145b2bec22e731280103639ef580e5f4eb809942" --header "api-key: f92022fc208a3b83fe2aa85d239560f7f0a55823"
It doesn't give any data the same way as terminal, any idea why?
I'm using a raw post since I'm using react native and I didn't see a react-native library.
I'm getting a 403 response when trying to upload using the raw upload form post- is there a setting that I need to set or is my public key not activated or something? I don't see a text response in the 403 response so not sure what the specific error is.
Here's my sample CURL from postman
curl -X POST -H "Content-Type: multipart/form-data; boundary=..."
-F "UPLOADCARE_PUB_KEY=foo"
-F "UPLOADCARE_STORE=1"
-F "file=#logo.jpg" "https://upload.uploadcare.com/base/"
Here are few things you should look at:
content-type is not needed here
reason for 4xx should be stated in response body or headers
make sure that you don't have typos in API key
make sure that automatic storing is enabled in the project or send "UPLOADCARE_STORE=auto"
make sure that your account is not blocked, has some quota left, file type is allowed, etc.
don't rely on Postman, check the command with cURL
This works:
curl -vv -X POST \
-F "UPLOADCARE_PUB_KEY=demopublickey" \
-F "UPLOADCARE_STORE=1" \
-F "file=#logo.png" "https://upload.uploadcare.com/
I see you are trying to use multipart upload, how big is logo.jpg? Are you able to upload the same file using the dashboard?
With a linux, I send a curl message like that:
curl -X POST -d "hello" http:/server_adress
the server is a Windows. I would like to find "hello" in my Apache log but I don't know how to do this.
Do you think the curl is correct ?
What do I have to put in my php file to see "hello" in my apache log ?
I find the answer.
the message curl have to be like this:
curl -X POST -d "message = hello" _http://server_adress
and in the file php.
$message=$_POST["message"];
write_debug_log("$message);
It returns "hello" in the apache log
Your curl command is okay. Its now you to the server log(and the administrator) to check the data on the log.
So far I know the data(means post data) doesn't come to by default in the log. You need to configure it from the log setting or something like that(if it is possible).
I am trying to receive json from a server which is using curl.
The problem is that the &method=somecall will be truncated somehow.
In apple teminal the call is working with '..' around the url, but I can't make it work in Xcode. It results in an invalid url.
Someone mentioned the curl parameter -d to add a method to a call. Is there a way to do it in Objective C?
This url is not working, neither in browser nor in code:
http://username:password#someURL/index_api.php?type=json&method=someMethod&id=1
OSX Terminal:
curl -u username:password 'http://someURL/index_api.php?type=json&method=someMethod&id=1'
is working only with the '..'
curl -G -u username:password 'http://someURL/index_api.php?type=json&method=someMethod&id=1' -d "type=json" -d "method=omeMethod" -d "id=1"
is also working on terminal.
I was now able to get a response using BBHTTP an objective c wrapper for libCurl.