Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[enhance] stdlib.core.web.request.HttpRequest: +get_Accept-Language

  • Loading branch information...
commit f758244e9b49f4e1665d4db49794cafc1499ea61 1 parent 2dc993a
@OpaOnWindowsNow OpaOnWindowsNow authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 stdlib/core/web/request/http_request.opa
View
6 stdlib/core/web/request/http_request.opa
@@ -156,6 +156,12 @@ HttpRequest = {{
get_headers(x).header_get("Host")
/**
+ * Try to get the "Accept-Language" header of a connexion
+ */
+ `get_Accept-Language`(x: HttpRequest.request): option(string) =
+ get_headers(x).header_get("Accept_Language")
+
+ /**
* Indicates if the given request is secured
*/
is_secured(x: HttpRequest.request): bool =

0 comments on commit f758244

Please sign in to comment.
Something went wrong with that request. Please try again.