Results for “http”
Small, practical examples. Search by task or narrow things down below.
Handle an unsuccessful HTTP status
jQuery: fail receives the jqXHR object and exposes its status.
jQuery✓ Tested
Read an HTTP query parameter
Read an HTTP query parameter using a complete Go program with explicit sample inputs.
Go✓ Tested
Send a JSON HTTP response
Send a JSON HTTP response using a complete Go program with explicit sample inputs.
Go✓ Tested
Set and retrieve an HTTP header
Set and retrieve an HTTP header using a complete Go program with explicit sample inputs.
Go✓ Tested
Test an HTTP handler without a server
Test an HTTP handler without a server using a complete Go program with explicit sample inputs.
Go✓ Tested
Attach an application-specific request header
jQuery: The headers option adds a header to this request only.
jQuery✓ Tested
Cancel a pending request
jQuery: abort rejects the jqXHR with the abort status.
jQuery✓ Tested
Encode URL query parameters
Encode URL query parameters using a complete Go program with explicit sample inputs.
Go✓ Tested
Extract a route path variable
Extract a route path variable using a complete Go program with explicit sample inputs.
Go✓ Tested
Fetch a plain-text resource
jQuery: An explicit text data type keeps the response as a string.
jQuery✓ Tested
Fetch and display JSON
jQuery: getJSON parses a successful JSON response.
jQuery✓ Tested
Handle a request timeout
jQuery: The timeout option bounds how long the client waits.
jQuery✓ Tested