httpjuice

package
v1.9.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package httpjuice provides utility functions for creating HTTP requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJSONHTTPRequestNoBearer added in v1.7.8

func CreateJSONHTTPRequestNoBearer(method, url, customTokenKey, idToken string, body io.Reader) (*http.Request, error)

CreateJSONHTTPRequestNoBearer creates an HTTP request with the given method, URL, idToken and body.

It sets the customTokenKey header to the provided idToken.

It also sets the Content-Type header to "application/json".

It returns the created *http.Request and any error encountered.

func CreateJSONHTTPRequestWithBearer added in v1.7.8

func CreateJSONHTTPRequestWithBearer(method, url, customTokenKey, idToken string, body io.Reader) (*http.Request, error)

CreateJSONHTTPRequestWithBearer creates an HTTP request with the given method, URL, idToken and body.

It sets the Authorization header to "Bearer " followed by the provided idToken.

It also sets the Content-Type header to "application/json".

It returns the created *http.Request and any error encountered.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL