-
- All Implemented Interfaces:
-
kotlin.collections.Map,kotlin.collections.MutableMap
public interface HttpHeaders implements Map
http 请求头类型,可用于请求或者接受相应。请求头类似于键值对格式,但是key对应的value是可以存在多个的, 因此其为一个 Map> 。
-
-
Method Summary
Modifier and Type Method Description abstract StringgetFirst(String headerKey)获取请求头多个值中的第一个。 abstract StringgetIndexed(String headerKey, Integer index)获取请求头的指定索引的值。 abstract Unitadd(String header, String value)添加一个值。 abstract UnitaddMultiple(String header, Collection<String> headerValues)添加多个值。 abstract Unitset(String header, String value)设置一个值。会覆盖原有的值。等同于put,但是set的值是一个单个的值。 abstract Set<MutableMap.MutableEntry<String, MutableList<String>>>getEntries()abstract Set<String>getKeys()abstract IntegergetSize()abstract Collection<MutableList<String>>getValues()-
Methods inherited from class love.forte.simbot.http.template.HttpHeaders
clear, compute, computeIfAbsent, computeIfPresent, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll -
Methods inherited from class kotlin.collections.MutableMap
containsKey, containsValue, forEach, get, getOrDefault, isEmpty -
Methods inherited from class kotlin.collections.Map
equals, hashCode, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getIndexed
abstract String getIndexed(String headerKey, Integer index)
获取请求头的指定索引的值。
-
addMultiple
abstract Unit addMultiple(String header, Collection<String> headerValues)
添加多个值。
-
getEntries
abstract Set<MutableMap.MutableEntry<String, MutableList<String>>> getEntries()
-
getValues
abstract Collection<MutableList<String>> getValues()
-
-
-
-