Curl Method



For more info on the curly girl method, check out my basic guide for both wavy and curly hair, or join my course Fabulous Curls Academ y. Fabulous Curls Academy Check out the digital downloads and courses to help you have the defined, bouncy curls you want. Curlis a tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, GOPHER, DICT, TELNET, LDAP or FILE). The command is designed to work without user interaction. The Curly Girl Method is a set of guidelines for styling curly and wavy hair with a focus on avoiding sulfates, silicones, and heat and mechanical damage. There are different lists of CG method approved hair products. In every HTTP request, there's a method. Sometimes called a verb. The most commonly used ones are GET, POST, HEAD and PUT. Normally however you do not specify the method in the command line, but instead the exact method used depends on the specific options you use. GET is default, using -d or -F makes it a POST, -I generates a HEAD and -T sends.

Curl is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without user interaction.

In this article, we’re going to discuss how to use curl to interact with RESTful APIs. curl is a command-line utility that can be used to send requests to an API.

Curl Method

API requests are made up of four different parts:

  • The endpoint. This is the URL which we send requests to.
  • The HTTP method. The action we want to perform. The most common methods are GETPOSTPUTDELETE and PATCH
  • The headers. The headers which we want to send along with our request, e.g. authorization header.
  • The body. The data we want to send to the api.

curl Syntax

The syntax for the curl command is:

The options we will cover in this post are:

  • -X or --request - HTTP method to be used
  • -i or --include - Include the response headers
  • -d or --data - The data to be sent to the API
  • -H or --header- Any additional headers to be sent

HTTP GET

The GET method is used to fetch a resource from a server. In curl, the GET method is the default method, so we don’t need to specify it.

Example:

GET With Query Parameters

We can also send query parameters along with the curl GET request.

Example:

HTTP POST

The POST method is used to create a resource on the server.

To send a curl POST request we use the option -X POST.

POST Form Data

Example:

By default, curl uses Content-Type: application/x-www-form-urlencoded as the Content-Type header, so we don’t need to specify it when sending form data.

POST JSON

To POST a JSON by curl we have to specify the Content-Type as application/json.

Example:

Curl method delete

HTTP PUT

The PUT method is used to update or replace a resource on the server. It replaces all data of the specified resource with the supplied request data.

Curl Method Delete

Note: For a PUT request, we have to provide all data in the request body.

To send a curl PUT request we use the option -X PUT.

Example:

The above PUT request will replace our previously created post with “New post title” and “New post body”.

HTTP PATCH

The PATCH method is used to make partial updates to the resource on the server.

Note: For a PATCH request, we don't have to provide all data. We only send the data we want updated.

To send a curl PATCH request we use the option -X PATCH.

Example:

Notice how we are only sending the body with “Updated post content” as we are doing a partial update.

HTTP DELETE

The DELETE method is used to remove the specified resource from the server.

To send a curl DELETE request we use the option -X DELETE.

Authentication

Sometimes an API endpoint has restricted access and will only serve requests to authenticated and authorized users. For these requests, we have to provide an access token in the header of the request.

To send a curl header, we use: -H option.

The following request sends POST request with a bearer token in the header:

Conclusion

In this post we learned how to send HTTP requests (GET, POST, PUT, PATCH and DELETE) to an API using curl commands.

Wavy hair is so unique and beautiful, but it can be hard to figure out how to style it. One day, it might look springy and even have some spirals, and the next, it could be nearly straight. Ever notice a different wave pattern in different sections of your hair? Me too. (Why is it curlier underneath?) How do I prevent it from looking stringy, but still achieve soft, defined waves without frizz? Keep reading for my ultimate guide, inspired by the curly girl method!

#1: Start with the Curly Girl Method

The Curly Girl Method is a set of guidelines for styling curly and wavy hair with a focus on avoiding sulfates, silicones, and heat and mechanical damage. There are different lists of CG method approved hair products. It is a great starting point and definitely helps to heal damaged hair, but once you start getting to know your waves, the Curly Girl Method may require some adjusting. If you want to style with a hairbrush, go for it. Waves can be easily weighed down, so I suggest not exclusively co-washing (washing with conditioner only).

#2: Use Lightweight Products, and Avoid Heavy Ones

This one is a real game-changer. Waves can easily be weighed down, so it’s best to use the right type of products: lightweight ones. Lightweight products are those with few or no oils and butters in them. Heavy products commonly have 5-10 oils and butters in them, such as coconut oil or shea butter. To learn more about what makes a product light or heavy, check out the post below! For a list of my favorite recommended lightweight products, see the following post.

Method
  • Shampoos (Hairstory, Original Moxie, Cantu, Not Your Mother’s, Treluxe)
  • Conditioners (DevaCurl, Giovanni, Herbal Essences, Not Your Mother’s, MopTop)
  • Leave-in Conditioners (Hair Dance, Kinky-Curly, Giovanni)
  • Creams (Hairstory, Not Your Mother’s)
  • Clear Stylers/Custards (Original Moxie, Treluxe, MopTop, Taliah Waajid)
  • Mousses (Not Your Mother’s, Curl Talk)
  • Gels (Treluxe, Original Moxie, Ecoslay, ION, Giovanni)

#3: Clarify Once a Month

For your regular routine, you want to use a gentle, sulfate-free cleanser. However, products can build up over time, and it’s important to give your hair and scalp a thorough, deep cleanse every now and then. Either grab a sulfate shampoo or one that is specifically for clarifying, and make sure to use it at least once a month! See below for my favorite $1 clarifying shampoo and some extra tips on how to use it!

Instagram / @katherinepagewaves

#4: So Saturated, Feels Like Seaweed

When you’re in the shower, detangle your hair while it’s soaking wet and use a very generous amount of conditioner. Your hair should feel slippery and slimy, just like seaweed. You should be able to easily run your fingers through it! This ensures your hair is properly hydrated, which is a huge key to avoiding frizz and achieving great results.

Curl Method Post

#5: Condition a Lot or a Little

Think of conditioner as the basis for your entire routine. If your hair is very dry, don’t rinse out all of your conditioner. If you want to decrease frizz and moisturize the hair, this is how you do it. If your waves are very fine, and you would like more volume and fluff, completely rinse out your conditioner or only use a tiny bit of leave-in.

Following are my favorite lightweight conditioners and leave-ins.

Instagram / @katherinepagewaves

#6: Achieve Curl Clumps

You can make curl clumps by using plenty of water and condition/leave-in conditioner. A curl (or wave) clump is the little group of hair that sticks together and forms a thick, single wave, or curl. This is the key to defined waves, and check out my video to see exactly how I do it.

Curl Method Not Allowed

#7: Flip Your Hair

When you’re ready to start styling your hair, flip it upside-down to rinse it. This not only helps those curl clumps to form, but also will really help achieve root volume, which can be especially hard with wavy hair.

#8: Pray the Products Work

For styling product application, start with soaking wet hair and apply with praying hands or glazing. I used to throw my hair in a towel right out of the shower, take it down, and then rake my products in. The result? I got uneven, frizzy, and stringy waves. Having enough water helps to thoroughly distribute the product, and using the praying hands method to apply the product will prevent the waves from stretching out too much. See the difference below?

#9: Modify Your Styling Application

If you tried tip #8, and it didn’t work out great for you, that’s completely fine and means it’s time for some experimenting. Try applying your products in a different order that is a better match for your porosity level, or in different ways, such as with a styling brush or on damp hair. I think soaking wet and praying hands is a great starting place, but everyone is different, so experiment away!

#10: Pile and Plop Your Hair

Curl Method Post

Plopping is taking your wet hair and PILING it at the top of your head into a microfiber towel or T-shirt, rather than twisting it. Yes, a T-shirt will cause less frizz, but a soft microfiber towel will absorb more water and greatly reduce drying time. Also, a microfiber towel will maintain your curl clumps. See how I do it.

#11: Try to Cup and Hover

The cup-and-hover-diffusing method gives you the most control and allows you to choose if you want a more defined, controlled look or a fluffy, voluminous look. Not to mention it minimizes heat damage to your ends! Begin by hovering the diffuser near your roots and using your hand to cup the hair and bring it up to the diffuser.

#12: Scrunch While Air-Drying

This is a somewhat against popular opinion, which is to not touch your hair while it’s drying, but I always scrunch while air drying! My hair is quite fine, so I will take all the volume I can get. I don’t mind a little frizz if it means my hair is a bit fuller-looking. I just make sure to do it very gently so as to not cause too much frizz.

Related Post:7 Ways to Preserve Curly Hair Overnight

Join the Wavy/Curly Hair Community

Feeling excited and inspired to start styling and wearing your hair wavy? You are not alone. There is an entire wavy/curly hair community on Instagram that loves to share not only tips, tricks and tutorials, but also frustrations and failures. I adore being a part of this community for the inspiration, encouragement, and curl friends. A couple of my favorite accounts are @coffeecurlygirl and @wavycurly for their gorgeous waves and wonderful tips.

Curl Method Wreath Tutorial

Are you excited to build a curly girl hair routine for wavy hair? Check out my page for many more tutorials, science-y explanations and all things waves. I would love to have you in this wonderful community.