ich diesen Code haben:wie kann ich senden 2 Objekt in angular2 post request
Client-Seite (angular2)
saveConfig(configType: ConfigTypes, gasConfigModel: GasConfigModel): any {
console.info("sending post request");
let headers = new Headers({
'Content-Type': 'application/json'
});
....
return this.http
.post(this.url, formParamString, ??, {headers: headers})
.map(res => res.json())
.subscribe(
data => {
console.info("next: ");
console.info(data)
},
err => console.error(err)
);
}
und
Server-Seite:
@Path("/SaveConfig")
@POST
@Consumes(MediaType.APPLICATION_JSON + ";charset=utf-8")
@Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
public void saveConfig(MyObj my object, CountryGasStationConfig countryGasStationConfig) throws Exception {....}
I weiß, wie man ein Objekt in Post sendet, aber wie kann ich 2 Objekt in Post-Anfrage senden?