Skip to content

Commit d7a09c4

Browse files
committed
Doc: Add more about ParamOptional/HeaderOptional
1 parent 6ca134f commit d7a09c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

builder_core.go

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ import (
2525
// then customize it with
2626
// [Builder.Scheme], [Builder.Host], [Builder.Hostf], [Builder.Path],
2727
// [Builder.Pathf], [Builder.Param], and [Builder.ParamInt].
28+
// [Builder.ParamOptional] can be used to add a query parameter
29+
// only if it has not been otherwise set.
2830
//
2931
// # Build an http.Request with Builder.Request
3032
//
@@ -37,6 +39,8 @@ import (
3739
// or set conventional header keys with
3840
// [Builder.Accept], [Builder.BasicAuth], [Builder.Bearer], [Builder.CacheControl],
3941
// [Builder.ContentType], [Builder.Cookie], and [Builder.UserAgent].
42+
// [Builder.HeaderOptional] can be used to add a header
43+
// only if it has not been otherwise set.
4044
//
4145
// Set the body of the request, if any, with [Builder.Body]
4246
// or use built in [Builder.BodyBytes], [Builder.BodyFile], [Builder.BodyForm],

0 commit comments

Comments
 (0)