FIND YOUR NEXT FEW LINES

Results for “HTTP & URLs”

Small, practical examples. Search by task or narrow things down below.

22 snippets foundClear filters
GoHTTP & URLs

Read an HTTP query parameter

Read an HTTP query parameter using a complete Go program with explicit sample inputs.

Go✓ Tested
GoHTTP & URLs

Send a JSON HTTP response

Send a JSON HTTP response using a complete Go program with explicit sample inputs.

Go✓ Tested
GoHTTP & URLs

Set and retrieve an HTTP header

Set and retrieve an HTTP header using a complete Go program with explicit sample inputs.

Go✓ Tested
GoHTTP & URLs

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
GoHTTP & URLs

Encode URL query parameters

Encode URL query parameters using a complete Go program with explicit sample inputs.

Go✓ Tested
GoHTTP & URLs

Extract a route path variable

Extract a route path variable using a complete Go program with explicit sample inputs.

Go✓ Tested
GoHTTP & URLs

Read a named request cookie

Read a named request cookie using a complete Go program with explicit sample inputs.

Go✓ Tested
GoHTTP & URLs

Read a URL’s host and path

Read a URL’s host and path using a complete Go program with explicit sample inputs.

Go✓ Tested
GoHTTP & URLs

Resolve a relative URL

Resolve a relative URL using a complete Go program with explicit sample inputs.

Go✓ Tested
jQueryHTTP requests

Handle an unsuccessful HTTP status

jQuery: fail receives the jqXHR object and exposes its status.

jQuery✓ Tested
jQueryHTTP requests

Attach an application-specific request header

jQuery: The headers option adds a header to this request only.

jQuery✓ Tested
jQueryHTTP requests

Cancel a pending request

jQuery: abort rejects the jqXHR with the abort status.

jQuery✓ Tested