The Prompt Library
CodingAPIs

API Request Builder (GET/POST)

Generate example API requests with headers and parameters.

Select Model:

Prompt:

Please help me create properly formatted API requests based on the specifications below. I need complete examples that I can use in my development work. API INFORMATION: - API Name/Service: [API_NAME] - Base URL: [BASE_URL] - Endpoint: [ENDPOINT] - HTTP Method: [HTTP_METHOD] - API Version: [API_VERSION] AUTHENTICATION: - Auth Type: [AUTH_TYPE] - Auth Details: [AUTH_DETAILS] - Token Format: [TOKEN_FORMAT] - Token Placement: [TOKEN_PLACEMENT] REQUEST DETAILS: - Purpose: [REQUEST_PURPOSE] - Required Headers: [REQUIRED_HEADERS] - Query Parameters: [QUERY_PARAMETERS] - Path Parameters: [PATH_PARAMETERS] - Request Body (if needed): [REQUEST_BODY_STRUCTURE] - Content Type: [CONTENT_TYPE] CONTEXT: - Expected Response: [RESPONSE_FORMAT] - Status Codes: [RESPONSE_CODES] - Rate Limits: [RATE_LIMITS] Please provide: 1. EXAMPLE REQUESTS - cURL command - JavaScript (Fetch and Axios) - Python (Requests) - Node.js - Optional: Any particularly relevant language for this API 2. REQUEST CONSTRUCTION - URL formation details - Header formatting - Parameter encoding - Body formatting (for applicable methods) - Authentication implementation 3. RESPONSE HANDLING - Parsing the response - Error handling - Status code handling - Pagination (if applicable) 4. BEST PRACTICES - Security considerations - Performance tips - Common pitfalls - Testing approaches Please ensure all examples are complete and properly formatted with appropriate spacing and indentation, using clear placeholders for values I need to replace with my specific data.

Related Prompts

Other prompts you might find useful

CodingAPIs

API Request Builder (GET/POST)

Generate example API requests with headers and parameters.

6 models availableView details
CodingAPIs

Explain API Response Structure

Interpret JSON or XML response and map it to data needs.

6 models availableView details
CodingAPIs

Write API Error Handling Logic

Create error handling logic for failed API responses.

6 models availableView details
CodingAPIs

Document Your API Endpoint

Write clear documentation for an API route including params and examples.

6 models availableView details