How can I prevent CURL to turn '#' into a comment?

curl command
curl options
convert postman to curl
curl post
curl quiet progress
curl no output to stdout
curl -k
curl hide output

I am using CURL in order to invoke an endpoint.

My endpoint has # as a part of it, e.g.

"http://Server.com/Magicxpi4.6/MgWebRequester.dlll?appname=IFSCarolina_Prod&prgname=HTTP&arguments=-Arest#Trigger1"

When I call this endpoint with the CURL command it cuts my endpoint after the hash sign and I am left with:

"http://Server.com/Magicxpi4.6/MgWebRequester.dlll?appname=IFSCarolina_Prod&prgname=HTTP&arguments=-Arest" ('#Trigger1' is missing)

I've tried to replace the has signed with %23 and I get the following result:

"http://Server.com/Magicxpi4.6/MgWebRequester.dlll?appname=IFSCarolina_Prod&prgname=HTTP&arguments=-Arest3Trigger1"

The full command that use:

curl -H "Content-Type: application/json" -X POST -d "{"id":"1"}" "http://Server.com/Magicxpi4.6/MgWebRequester.dlll?appname=IFSCarolina_Prod&prgname=HTTP&arguments=-Arest#Trigger1"

If you (correctly) use %23 in the arguments, but you get

"http://...?...&arguments=-Arest3Trigger1"
                                ^

with missing %2, you are probably making the call from a batch file and the %2 is being parsed as the second argument to the batch file (empty in this case).

If this is the case you will need to escape the percent sign by doubling it, using %%23.

From a batch file the line

curl "http://httpbin.org/anything?appname=IFSCarolina_Prod&prgname=HTTP&arguments=-Arest%%23Trigger1"

calling httpbin.org request and response service will return

{
  "args": {
    "appname": "IFSCarolina_Prod",
    "arguments": "-Arest#Trigger1",
    "prgname": "HTTP"
  },
  "data": "",
  "files": {},
  "form": {},
  "headers": {
    "Accept": "*/*",
    "Host": "httpbin.org",
    "User-Agent": "curl/7.55.1"
  },
  "json": null,
  "method": "GET",
  "origin": "   .   .   .   ",
  "url": "https://httpbin.org/anything?appname=IFSCarolina_Prod&prgname=HTTP&arguments=-Arest%23Trigger1"
}

Disable output when using cURL, cURL makes a web request and shows you the response body. You can If you want no output at all (for example for cronjobs), add the --silent switch: Copy. Alternatively, if you went with your natural curls, you could pump up the volume with the aid of a curling iron. This way of styling would not cause the flip at your current length. Blow-drying with a round brush brings on the flip. Maggie Gyllenhaal at the 2010 BAFTA Tea Party.

Curl doesn't turn # into a remark. The # sign and everything that follows is not meant to be sent to the server, and therefor curl doesn't.

The part before the # is sent to the server and determines what the server sends back.

In standard HTML, that part after the# is used to scroll to an anchor or an element with the given name.

With JavaScript in the browser, the script can determine the part after the # and use this to do whatever it wants to do.

But curl is not a JavaScript Interpreter, it just fetches data from a server, so it ignores the part after #.

curl hide progress bar output on Linux/Unix shell scripts, The procedure to hide curl progress bar is to pass the -s or --silent option to the curl command: Open the terminal app. Type the command: curl -s https://www.cyberciti.biz/ > /tmp/output. Treatment for Curled Toes 1. Rehab Exercises. Therapeutic exercise for curled toes is the most effective, noninvasive treatment available. It 2. Botox. Botox is an evidence-based treatment for fixing curled toes after stroke. It helps relieve spasticity by 3. Electrical Stimulation. When you

I believe this will literally break the HTTP specs, but if you really want to do it (and you probably don't), I believe you can abuse -X to get it done:

curl 'http://Server.com' -X "$(printf 'GET /Magicxpi4.6/MgWebRequester.dlll?appname=IFSCarolina_Prod&prgname=HTTP&arguments=-Arest#Trigger1 HTTP/1.1\r\nX-ignore-this: ')"

which will give you:

GET /Magicxpi4.6/MgWebRequester.dlll?appname=IFSCarolina_Prod&prgname=HTTP&arguments=-Arest#Trigger1 HTTP/1.1
X-ignore-this:  / HTTP/1.1
Host: Server.com
User-Agent: curl/7.63.0
Accept: */*

... But no sane HTTP server will actually require you to do this, if you want a hashtag in thre, urlencode it like %23... but that probably means you need a general-purpose URL-encoder too

Frequently Asked Questions, 4.7 How do I keep user names and passwords secret in Curl command lines? 4.8 I found a 5.11 How do I make libcurl not receive the whole HTTP response? Leaf curl is one of the common problems of nectarines and peaches. While leaf curl peach is also known as one of the most puzzling problems. It is quite easy to identify these diseases and noticing it is not very difficult. Leaf curl is one of the more serious plant diseases which can destroy the new growth from your trees.

Activity: Use methods with curl, This information will be passed in the -d parameter of the curl request: method instead of POST to update the pet's name (keep the same curl content otherwise): Redoc.ly: Transform your API definition into interactive documentation, fast. How can I prevent `curl` from printing a table with progress information? Ask Question Asked 4 months ago. Active 4 months ago. Viewed 217 times 3. From 16.04 command

4 Reason your curls aren't holding, Do you know how to make curls last longer? If you don't, you're in the right place! There are Duration: 8:59 Posted: 17 Apr 2017 Planting disease-resistant varieties is a first step toward preventing serious tomato problems, and most leaf curl issues in home gardens can be corrected so the plants can continue to grow and

How to Make Curls Tighter at the Root & More Defined, Here's 10 tips to get tighter, more defined curls at the root, volume, How to Prevent Frizzy Duration: 14:02 Posted: 29 Mar 2020 Straighten only the ends in order to keep the volume you created at the crown through blow-drying with the round brush. Remember to tuck the straightener under while finishing the ends to create the under-curl. Spray your hands with extra-hold or anti-humidity hair spray and run them along the top of your hair.

Comments
  • Thanks you so much man that was so helpful you can't imagine :)
  • Maybe you could answer another question.. the data that i am posting to the endpoint is a json file that have repeting elements with squre brackets [] and it seem to disturb..
  • @RoiSolberg, If I have to bet your problem are the quotes. You can try to save the data you want to post inside a file and use -d @x:\somewhere\file.json to avoid having to deal with the command parser.
  • @RoiSolberg - If you have another question, create another post. SO likes discrete, to-the-point questions and answers.
  • Thanks for your replay, is there any way to work around this so my endpoint will be complete?
  • If this answers your question, you could accept the answer. What exactly do you want to achieve?