`.ajax()` documentation unclear about expectations/data type for `errorThrown`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- jquery
- Ambito
- documentation
Direzione di ricerca
Inizia dalla documentazione di $.ajax(), in particolare dall'impostazione error e dalla descrizione del relativo parametro errorThrown. Concilia le affermazioni citate sul tipo del parametro e documenta la limitazione di HTTP/2 relativa a un statusText vuoto; il lavoro è completato quando il valore previsto e la limitazione sono privi di ambiguità.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Migrated from jQuery repo: https://github.com/jquery/jquery/issues/4211
Description
There is a seeming contradiction in the documentation for $.ajax().
The docs for the error setting of this function indicate:
... The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred...
But later the same docs indicate:
... When an HTTP error occurs,
errorThrownreceives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." ...
In addition, the docs indicate that the type of the parameter is String. But, based on the first sentence, it sounds like it can be either an object or a string; which is it?
Separately, it appears that the errorThrown will always be an empty string for HTTP errors that occur when using HTTP/2 (aka H2). This appears to be because statusText is always an empty string for an HTTP/2 request (more info: https://stackoverflow.com/questions/41632077/why-is-the-statustext-of-my-xhr-empty).
I'd love it for the jQuery team to weigh-in on both of these limitations in the current docs.
- Lingua principale
- HTML
- Stelle
- 324
- Fork
- 259
- Merge medio
- 1g 30m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di jquery/api.jquery.com
-
Mention of ‘timestamp’ in documentation for ‘cache’ parameter of ‘ajax’ is misleadingForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
jquery/api.jquery.com#1241 · 2 commenti ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
jquery/api.jquery.com#1176 ·
-
The documentation of CSS methods should be further classifiedForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
jquery/api.jquery.com#1281 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
jquery/api.jquery.com#1271 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
jquery/api.jquery.com#1259 ·
Tutte le issue di jquery/api.jquery.com
Issue simili
-
5-minutes algorithm all-levels any-language beginner-friendly community documentation easy first-timers-only good first issue hacktoberfest help wanted learning no-code-needed open-source python students
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 88/100
Huerte/algo-solutions-python#253 ·
I maintainer di solito rispondono entro 1 giorno
-
size/s
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
sipyourdrink-ltd/bernstein#7179 ·
I maintainer di solito rispondono entro 1 giorno
-
area/docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
meshery/meshery#23375 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Synthetic
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
samtoth/agda-synthetic-categories#373 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-system-test-1319336938-43312257375-1- Agent System assignment-policy flow 43312257375-1Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
tanaabased/big-test-bucket#19952 ·
I maintainer di solito rispondono entro 1 giorno