id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
Process_Threads/1581_28_0.txt | {{ message }}
gofiber / fiber Public | |
Process_Threads/25751_6_0.txt | Instant dev environments
* Copilot | |
Process_Threads/25751_9_0.txt | Plan and track work
* Discussions | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_80_0.txt | lang-cpp
##### Stack Overflow | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_2_0.txt | Loading…
1. ### current community | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_7_0.txt | 1. 1. Home
2. Questions | |
Process_Threads/8_73_0.txt | info
If the header is not specified or there is no proper format, text/plain
is used. | |
Process_Threads/8_264_0.txt | ## Set
Sets the response’s HTTP header field to the specified ` key ` , ` value ` . | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_74_0.txt | Minimal possible stack size on Windows when using C++ exceptions (using boost
context fibers)
3 | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_53_0.txt | Draft saved
Draft discarded | |
Process_Threads/8_191_0.txt |
func (c *Ctx) QueryFloat(key string, defaultValue ...float64) float64
Example | |
Process_Threads/25751_32_0.txt | Sign up for GitHub
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement . We’ll occasionally send you account related emails. | |
Process_Threads/8_12_0.txt | Example
// Accept: text/html, application/json; q=0.8, text/plain; q=0.5; charset="utf-8"
app.Get("/", func(c *fiber.Ctx) error {
c.Accepts("html") // "html"
c.Accepts("text/html") // "text/html"
c.Accepts("json", "text") // "json"
c.Acc... | |
Process_Threads/1581_3_0.txt | Automate any workflow
* Packages | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_83_0.txt | * About
* Press
* Work Here
* Legal
* Privacy Policy
* Terms of Service
* Contact Us
* Cookie Settings
* Cookie Policy
##### Stack Exchange Network | |
Process_Threads/8_123_0.txt | Signature
func (c *Ctx) JSON(data interface{}, ctype ...string) error
| |
Process_Threads/8_228_0.txt |
func (c *Ctx) Response() *fasthttp.Response
Example | |
Process_Threads/8_169_0.txt | ## Protocol
Contains the request protocol string: ` http ` or ` https ` for TLS
requests. | |
Process_Threads/8_207_0.txt |
func (c *Ctx) Redirect(location string, status ...int) error
Example | |
Process_Threads/25751_69_0.txt | ###
ReneWerner87 commented Sep 1, 2023 • | |
Process_Threads/25751_90_0.txt | ps1:
$endpointUrl = "http://localhost:8003/eingang"
$jsonTest = @{
text = "Überprüfe: »«Ø®"
} | ConvertTo-Json
Write-Host $jsonTest
$headers = @{
"Content-Type" = "application/json; charset=utf-8"
}
try {
$antwort = Invoke-RestMethod -Ur... | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_78_0.txt | Question feed
# Subscribe to RSS | |
Process_Threads/8_41_0.txt | Signature
func (c *Ctx) Body() []byte
| |
Process_Threads/8_35_0.txt |
func (c *Ctx) Bind(vars Map) error
Example | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_65_0.txt | * Policy: Generative AI (e.g., ChatGPT) is banned
* The [connect] tag is being burninated | |
Process_Threads/8_159_0.txt | Method can be used to get an integer from the route parameters. Please note if
that parameter is not in the request, zero will be returned. If the parameter
is NOT a number, zero and an error will be returned
info | |
Process_Threads/8_87_0.txt | The match is case-insensitive .
Signature | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_28_0.txt | Share
Follow | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_17_0.txt | Learn more about Teams
Get early access and see previews of new features. | |
Process_Threads/25751_88_0.txt | curl:
curl -X POST -H "Content-Type: application/json" -d '{"text":"Überprüfe: »«Ø®"}' http://localhost:8003/eingang
| |
Process_Threads/8_241_0.txt | Method is used to save any multipart file to an external storage system.
Signature | |
Process_Threads/25751_63_0.txt | Question, why is using ` fiber.MIMEApplicationJSONCharsetUTF8 ` not a viable
option in your use-case when returning back to the user?
---
All reactions
Sorry, something went wrong. | |
Process_Threads/25751_76_0.txt | UTF-8 handles mostly everything correct, even things that are not UTF-8.
All reactions
Sorry, something went wrong. | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_64_0.txt | * The reverse mullett model of software engineering
* Featured on Meta
* Testing a new version of Stack Overflow Jobs | |
Process_Threads/8_24_0.txt | Appends the specified value to the HTTP response header field.
caution | |
Process_Threads/25751_20_0.txt | Search
Clear | |
Process_Threads/8_193_0.txt | This property is an object containing a property for each query integer
parameter in the route, you could pass an optional default value that will be
returned if the query key does not exist.
caution | |
Process_Threads/8_168_0.txt | Example
// GET http://example.com/users?sort=desc
app.Get("/users", func(c *fiber.Ctx) error {
c.Path() // "/users"
c.Path("/john")
c.Path() // "/john"
// ...
})
| |
Process_Threads/1581_65_0.txt | Sorry, something went wrong.
Copy link | |
Process_Threads/8_277_0.txt | Signature
func (c *Ctx) Status(status int) *Ctx
| |
Process_Threads/8_229_0.txt |
app.Get("/", func(c *fiber.Ctx) error {
c.Response().BodyWriter().Write([]byte("Hello, World!"))
// => "Hello, World!"
return nil
})
## RestartRouting | |
Process_Threads/25751_111_0.txt | edited
> This should be configurable Fiber wise. | |
Process_Threads/8_100_0.txt | Generates URLs to named routes, with parameters. URLs are relative, for
example: "/user/1831"
Signature | |
Process_Threads/25751_31_0.txt | New issue
Have a question about this project? Sign up for a free GitHub account to open
an issue and contact its maintainers and the community. | |
Process_Threads/8_157_0.txt | Example
app.Get("/v1/*/shop/*", func(c *fiber.Ctx) error {
c.Params("*") // outputs the values of the first wildcard segment
})
| |
Process_Threads/25751_91_0.txt | output ps1:
Empfangenes JSON: {Text:�oberprüfe: »«�~®}
| |
Process_Threads/25751_58_0.txt | Copy link
Member | |
Process_Threads/8_144_0.txt |
app.Post("/", func(c *fiber.Ctx) error {
// Parse the multipart form:
if form, err := c.MultipartForm(); err == nil {
// => *multipart.Form
if token := form.Value["token"]; len(token) > 0 {
// Get key value:
fmt.Println(token[0])
... | |
Process_Threads/8_243_0.txt |
storage := memory.New()
app.Post("/", func(c *fiber.Ctx) error {
// Parse the multipart form:
if form, err := c.MultipartForm(); err == nil {
// => *multipart.Form
// Get all files from "documents" key:
files := form.File["documents"]
... | |
Process_Threads/1581_14_0.txt | Resources
* Learning Pathways
* White papers, Ebooks, Webinars
* Customer Stories
* Partners | |
Process_Threads/25751_16_0.txt | Fund open source developers
* The ReadME Project | |
Process_Threads/8_70_0.txt | Signature
func (c *Ctx) Download(file string, filename ...string) error
| |
Process_Threads/1581_0_0.txt | Skip to content
## Navigation Menu | |
Process_Threads/8_296_0.txt | Writef adopts the string with variables
Signature | |
Process_Threads/8_114_0.txt | ## Is
Returns the matching content type , if the incoming request’s Content-Type
HTTP header field matches the MIME type specified by the type parameter. | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_60_0.txt | Required, but never shown
Post Your Answer Discard | |
Process_Threads/1581_76_0.txt | >
> How can this work c.Locals get two parametr how you could give him one and
> publish here that this is working.
This method allows you to store and retrieve any data in the context of a
request. It can accept one or two parameters, depending on whether you want to
get or set a value.
The first parameter is the k... | |
Process_Threads/1581_62_0.txt | Member
### | |
Process_Threads/25751_118_0.txt | ☢️ Bug 🛠 In Progress
Projects | |
Process_Threads/8_26_0.txt |
func (c *Ctx) Append(field string, values ...string)
Example | |
Process_Threads/8_285_0.txt |
app.Get("/", func(c *fiber.Ctx) error {
c.Type(".html") // => "text/html"
c.Type("html") // => "text/html"
c.Type("png") // => "image/png"
c.Type("json", "utf-8") // => "application/json; charset=utf-8"
// ...
})
## UserContext | |
Process_Threads/8_236_0.txt | Do not rely on ` c.Route() ` in middlewares before calling ` c.Next() ` \- `
c.Route() ` returns the last executed route .
Example | |
Process_Threads/8_30_0.txt |
app.Get("/", func(c *fiber.Ctx) error {
c.Attachment()
// => Content-Disposition: attachment
c.Attachment("./upload/images/logo.png")
// => Content-Disposition: attachment; filename="logo.png"
// => Content-Type: image/png
// ...
})
... | |
Process_Threads/8_172_0.txt | ## Queries
Queries is a function that returns an object containing a property for each
query string parameter in the route. | |
Process_Threads/Process_Threads_2_0.txt | Skip to main content
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security
updates, and technical support.
[ Download Microsoft Edge ](https://go.microsoft.com/fwlink/p/?LinkID=2092881
) [ More info about Internet Explorer and Microsoft Edge
](https://learn... | |
Process_Threads/25751_14_0.txt | Resources
* Learning Pathways
* White papers, Ebooks, Webinars
* Customer Stories
* Partners | |
Process_Threads/1581_54_0.txt | * 🚀 1 reaction
Sorry, something went wrong. | |
Process_Threads/25751_42_0.txt | I used Fiber to handle and API Endpoint and take JSON objects with strings and
simply store them in a DB. The strings are gettinbg send as UTF8 encoded
(which everything should be).
When I read the DB it shows broken chars like: ` M�dchen ` (should be `
Mädchen ` ) The fix was to implement this:
app... | |
Process_Threads/8_9_0.txt | ## Accepts
Checks, if the specified extensions or content types are acceptable. | |
Process_Threads/8_69_0.txt | Typically, browsers will prompt the user to download. By default, the
Content-Disposition header ` filename= ` parameter is the file path ( this
typically appears in the browser dialog ).
Override this default with the filename parameter. | |
Process_Threads/1581_12_0.txt | For
* Enterprise
* Teams
* Startups
* Education | |
Process_Threads/8_248_0.txt |
func (c *Ctx) Send(body []byte) error
Example | |
Process_Threads/8_137_0.txt |
func (c *Ctx) Location(path string)
Example | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_25_0.txt | On a related note, I wondered how Cygwin dealt with this for ucontext. The
source here
http://szupervigyor.ddsi.hu/source/in/openjdk-6-6b18-1.8.13/cacao-0.99.4/src/vm/jit/i386/cygwin/ucontext.c
uses ` GetThreadContext ` / ` SetThreadContext ` to implement ucontext.
However, from experimentation I see that this also fai... | |
Process_Threads/1581_2_0.txt | * Product
* Actions | |
Process_Threads/8_111_0.txt | Signature
func (c *Ctx) IPs() []string
| |
Process_Threads/25751_43_0.txt | Which I think is a good workaround, but this just works for JSON and also
there was no was just setting the encoding to UTF8 without touching the
mimetype. I think Fiber should work with UTF8 encoding by default, as it can
handle mostly everything. There should be something like this:
app := fiber.New(... | |
Process_Threads/8_187_0.txt |
// GET http://example.com/?name=alex&want_pizza=false&id=
app.Get("/", func(c *fiber.Ctx) error {
c.QueryBool("want_pizza") // false
c.QueryBool("want_pizza", true) // false
c.QueryBool("name") // false
c.QueryBool("name", true) ... | |
Process_Threads/25751_10_0.txt | Collaborate outside of code
Explore | |
Process_Threads/1581_7_0.txt | Write better code with AI
* Code review | |
Process_Threads/8_77_0.txt | Signature
func (c *Ctx) FormFile(key string) (*multipart.FileHeader, error)
| |
Process_Threads/1581_29_0.txt | * * Notifications
* Fork 1.6k
* Star 31.5k
* Code
* Issues 80
* Pull requests 6
* Discussions
* Actions
* Projects 2
* Security
* Insights | |
Process_Threads/25751_96_0.txt | Sorry to jump in halfway, but as an extension to this, in my experience this
is based on the client receiving the json, not necessarily fiber itself.
Previous discussion: #248
package main
import (
"github.com/gofiber/fiber/v2"
)
func main() {
app := fiber.New()
symb... | |
Process_Threads/8_148_0.txt | Returns the original request URL.
Signature | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_29_0.txt | edited Jun 9, 2015 at 9:55
Andrew Parker | |
Process_Threads/8_287_0.txt |
func (c *Ctx) UserContext() context.Context
Example | |
Process_Threads/1581_53_0.txt |
app.Use(func() fiber.Handler {
return func(c *fiber.Ctx) error {
return c.Next()
}
}())
---
🚀 1 levniko reacted with rocket emoji
All reactions | |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_81_0.txt | * Questions
* Help
##### Products | |
Process_Threads/25751_113_0.txt | So you at least don't have to set it to ` utf-8 ` manually.
---
👍 2 gaby and filipesilvaa reacted with thumbs up emoji
All reactions | |
Process_Threads/8_71_0.txt | Example
app.Get("/", func(c *fiber.Ctx) error {
return c.Download("./files/report-12345.pdf");
// => Download report-12345.pdf
return c.Download("./files/report-12345.pdf", "report.pdf");
// => Download report.pdf
})
| |
Process_Threads/modifying-the-stack-on-windows-tib-and-exceptions6_38_0.txt | * I'll take a look at the boost context source. And fair point re the motiviation. I was hoping we wouldn't need full details but we're probably at the stage where I should expand so as to save wasted energy. I'll do some more investigation then add more details.
– Andrew Parker | |
Process_Threads/8_301_0.txt |
app.Get("/", func(c *fiber.Ctx) error {
c.WriteString("Hello, World!") // => "Hello, World!"
fmt.Fprintf(c, "%s\n", "Hello, World!") // "Hello, World!Hello, World!"
})
## XHR | |
Process_Threads/8_308_0.txt |
type SomeStruct struct {
XMLName xml.Name `xml:"Fiber"`
Name string `xml:"Name"`
Age uint8 `xml:"Age"`
}
app.Get("/", func(c *fiber.Ctx) error {
// Create data struct:
data := SomeStruct{
Name: "Grame",
Age: 20,
... | |
Process_Threads/8_220_0.txt |
func (c *Ctx) Render(name string, bind interface{}, layouts ...string) error
## Request | |
Process_Threads/8_249_0.txt |
app.Get("/", func(c *fiber.Ctx) error {
return c.Send([]byte("Hello, World!")) // => "Hello, World!"
})
Fiber also provides ` SendString ` and ` SendStream ` methods for raw inputs. | |
Process_Threads/25751_117_0.txt | Fenny
Labels | |
Process_Threads/8_122_0.txt | info
JSON also sets the content header to the ` ctype ` parameter. If no ` ctype `
is passed in, the header is set to ` application/json ` . | |
Process_Threads/8_13_0.txt | Example 2
// Accept: text/html, text/*, application/json, */*; q=0
app.Get("/", func(c *fiber.Ctx) error {
c.Accepts("text/plain", "application/json") // "application/json", due to specificity
c.Accepts("application/json", "text/html") // "text/html", due to first match
... | |
Process_Threads/25751_37_0.txt | Assignees
Labels | |
Process_Threads/8_270_0.txt | ## SetUserContext
Sets the user specified implementation for context interface. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.