Capitalize First Letter API

Capitalize First Letter API provides functionality related to manipulating text by capitalizing the first letter of each text.

URL: https://api.apipip.com/v1/capitalize-first-letter/


Parameters

Name Description
text (Required) (string): The text to be processed and have the first letter of each word capitalized.

Headers

Name Description
X-Key (No required)

How to use Capitalize First Letter API

                
import requests

url = 'https://api.apipip.com/v1/capitalize-first-letter/'
data = {'text': ''}
response = requests.post(url, data=data)

if response.status_code == 200:
    print(response.text)
else:
    print("Error:", response.text)
                
                    
                
import Foundation

let url = URL(string: "https://api.apipip.com/v1/capitalize-first-letter/")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
let data = ["text": "hello world"]
request.httpBody = try? JSONSerialization.data(withJSONObject: data)

let task = URLSession.shared.dataTask(with: request) { (data, response, error) in
    if let error = error {
        print("Error:", error.localizedDescription)
        return
    }
    
    if let data = data, let response = response as? HTTPURLResponse {
        if response.statusCode == 200 {
            if let result = String(data: data, encoding: .utf8) {
                print(result)
            }
        } else {
            print("Error:", response.statusCode)
        }
    }
}

task.resume()
                
                    
                
const url = 'https://api.apipip.com/v1/capitalize-first-letter/';
const data = {"text": "hello world" };

fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(data)
})
  .then(response => {
    if (response.ok) {
      return response.text();
    } else {
      throw new Error('Error: ' + response.status);
    }
  })
  .then(result => {
    console.log(result);
  })
  .catch(error => {
    console.log('Error:', error.message);
  });
                
                    

API Response

                            
{"Response":"Hello world"}
                            
                                

Note: The API works with all programming languages